Page 1 of 1
how to get a picture of a website?
Posted: Sat Aug 13, 2005 5:38 pm
by cheerio
can someone please post the PHP code to getting a screen shot of a website...i've seen it on like some domain search engines and would really like to know how this is done
i've searched lots of different things but didn't really find what i was looking for
i wasn't to sure exactly where to post this so sorry in advanced
thanks in advanced
and thanks to PHPdn for building such a large PHP community.
Posted: Sat Aug 13, 2005 5:48 pm
by feyd
basically, it's done through an automated navigation of a browser and screencapture utility on the machine. You don't really have any hardware interaction within php itself, but you can ask the system to perform the actions required through php.
Posted: Sat Aug 13, 2005 7:33 pm
by cheerio
oh i see, thanks for the quick reply

Posted: Sat Aug 13, 2005 9:51 pm
by josh
Some one should make a service that allows developers without the resources to get screenshots (if this doesn't already exist)
Posted: Sat Aug 13, 2005 10:09 pm
by feyd
I remember such a "service" existing in some fashion...... it was like a browser test project so a web dev could see how their stuff looked in many various browsers and platforms...
Posted: Sat Aug 13, 2005 11:36 pm
by josh
I remember seeing that once, but it cost money... the thing I had in mind would be like 1,000 free screen shots a month or something, after that $1 / 100 screenshots. The dev could file_get_conents("
http://example.com?url=$url"); and it would return an image stream or something.
Posted: Sun Aug 14, 2005 2:33 am
by patrikG
http://www.danvine.com/icapture/ was free for a while, looks like you have to register now (for free).
Posted: Sun Aug 14, 2005 11:08 am
by josh
Sorry to hijack the thread but I have a question. What if I wanted to set up a machine and run a service like this. How are they making the API call to the browser, and taking the screenshots? Is there a program? Is so what are they called, or can you name a few for linux & windows?
Posted: Sun Aug 14, 2005 11:33 am
by John Cartwright
most likely a simple exec() call. As for the program they use, not sure.