Web Hosting Talk







View Full Version : Capture an html page image in php


mitchlrm
11-19-2006, 08:50 PM
Hi,
I have a request from a client to capture the image of some web pages on a regular basis as a jpeg, gif or similar. I can read the html from the web pages in php but that misses any graphics in the page.


Any idea on how to do this? I did a search and found some Windows based solutions but this needs to run on a unix/php/mysql system.

tiamak
11-19-2006, 09:10 PM
a stupid one only :D

use some good class for html2pdf conversion and convert your page to pdf (just google, there are tons of these)
then use "convert" command from imagemagick and create image (png for example) from your pdf file :)

however this will not give you ideal results - i doubt if it will work for flash sites or dhtml/ajax sites

Energizer Bunny
11-19-2006, 11:35 PM
Hey tiamak just tried using ur method of html to pdf convertor using my acrobat 7 pro, and here is the psd file attached (darn it was too big so converted to gif).


http://www.sbclansite.com/img/users/Owner/Capture.gif

mitchlrm
11-20-2006, 12:19 AM
The client is probably Ok with a PDF, instead of jpg. He's really just looking for an historical look at several web sites. Thanks for the suggestion.