A PHP script/API to take screenshot of a given div of a given url

This project received 1 bids from talented freelancers with an average bid price of $30 USD.

Get free quotes for a project like this
Project Budget
$10 - $30 USD
Total Bids
Project Description

We need a PHP script/API/web-service which should be capable of taking a screenshot of a given DIV id of a given URL.

For example say there a website with the following [url removed, login to view] we want to take the screen shot of of the div id "maincontent" then the screenshot should be only the picture/image of div area and it should not include other areas of this url/webpage.



<div id="wrapper">

<div id="header">header</div>

<div id="content">

<div id="maincontent">lots of content with various stuffs like image text etc.</div>

<div ="sidbar">banners</div>


<div id="footer">header</div>





Please note this is not going to be a php script which is NOT going to run of a browser application as a web page and INSTEAD this going to be a back-end API which can be called from other functions or thorough web service calls. This should accept the ID of a particular section(div in most of the cases) together with the web site url and screenshot dimensions as parameters and return the image as a output. (Additional parameters may be needed for "Other considerations." section discussed below.)

Seems not "html2canvas" cannot be used for this script as it going to run in backend. But if there a way to load virtual browsers programmatically and utilize html2canvas

kinda tools to deliver this result still we can consider.

Also please note we are not planning to buy 3rd party screenshot subscriptions or use limited free 3rd party screenshot services for this [url removed, login to view] we need a standalone script which do all the stuff itself using free open source APIs.

Please note the picture quality is important.

Other considerations/expectation


[url removed, login to view] or Lightboxes should not be allowed/shown in the screenshot when the websites displays such lightboxes/popups.

[url removed, login to view] should be able to hide/blackout certain parts of webpage(which is a sub div/part of the large div we taking screenshot.) when taking screenshots.

For example in the code used above we wanted "maincontent" but within "maincontent" we might need to blackout/remove/hide certain web elements


<div id="maincontent">

lots of good content text we need this in the screenshot

<img>A image we dont like this image so remove this from screenshot</img>

<p id="unwantedtext">We don't like this text so remove this from screenshot</p>

<div>Lots of use ful text we need this in the screenshot</div>

<img>some good images we need this in the screenshot<img>


3.A demo application to demo this API. Just to a form with parameters to this API and a section to display the result.

This can be developed in 2 mile stones.

[url removed, login to view] milestone is to have screenshot of the DIV section of given URL (of-course should be able to get rid of popups.)

[url removed, login to view] milestone should focus on #2 of "Other considerations/expectation." section.

First mile stone is the most critical but you get chance if you are confident to develop both milestones.

*Bid for the first mile stone only.

Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online