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

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: HTML, Imaging, Javascript, PHP

See more: screenshot div, screenshot webpage php, wrapper services, websites to buy, web page php develop, wanted to develop webpage, tools to develop websites, planning to develop a website, html websites buy, html free websites, html code to develop a web page, get html code from url, free php tools, free html websites, example of good websites, example of a note, example of a bid, example of a, div 1 a, develop a picture, critical section example, buy web banners, service now api, parts of a web page, take picture

About the Employer:
( 1 review ) Lake City, United States

Project ID: #5204056

1 freelancer is bidding on average $30 for this job


Er is nog geen voorstel voorzien

$30 USD in 3 days
(0 Reviews)