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

Avg Bid (USD)
Project Budget (USD)
$10 - $30

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 process.Instead 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
1.Popups 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.
1.First milestone is to have screenshot of the DIV section of given URL (of-course should be able to get rid of popups.)
2.Second 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:
HTML, Imaging, Javascript, PHP
About the employer:
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

Hire eldistraido
$ 30
in 3 days