Screenshot of web page using php

How can we get the screenshot the live web page using php.

The basic idea is to make it like this:

  1. Install a browser in the server.

  2. Using commands run the browser, open up the URL, use Perl script to take screenshots.

I don’t know the exact codes but to save time you could just this the following services:

http://images.websnapr.com/?url=yourdomain.com&size=t
http://www.webshotspro.com/
http://www.thumbalizr.com/

Basically use them to generate the thumbnail and do get_file_contents() to get the thumbnail :p.

Here’s something you can use in your own server:

http://hasin.wordpress.com/2006/09/03/generate-thumbnail-of-any-webpage-using-php/

I use http://www.girafa.com/ on my site. They offer 2000 free thumbnails per day.

There are scripts that do that, but none of the UNIX compatible browsers can report back to an external application, when the URL that it’s told to load has loaded. The freely available scripts that I have seen, use a time setting to do the screen shot. If the page hasn’t loaded in that time, you get nothing. You would have to have a custom solution that embeds a browser engine, and therefore would have access to the events triggered by the page loading.

let me try one of…

Most linux servers don’t have a display manager installed and won’t be able to do this.

I tried most of them but non of them can be used some are quite near but most of them have some problem

http://images.websnapr.com/?url=yourdomain.com&size=t

is there something like this
i don’t know what is wrong with this i tried it but there is some problem in generating the image.

http://images.websnapr.com/?url=yourdomain.com&size=l seems to be working fine. I just changed the size to l (large).

When you visit the URL it doesn’t generate the thumbnail right away, but second time it does.

thanks it seems like it is working

I use w3snapshot.com for this.