tags:

views:

115

answers:

3

I have to make an image of a dynamic page i.e. the page keeps on changing in every 5 minutes. I want to make images of that very page that keeps on changing so that i can have its records saved in the form of images.

How can i do that using php??

i have no idea about this and a little elaboration in answers will be highly appreciated!!

+1  A: 

Two steps:

1: Create a script that captures the current data in image form.

If you provide more information about what you mean when you say "create an image of dynamic data", I can probably point you to some resources you can use. For now, just have a look at the GD library.

2: Set up a job that runs the script every 5 minutes

This can be done via Cron. I would suggest investigating if you can run the script when the data changes, instead of at specific intervals.

gnud
you can consider this page for an example..it keeps on changing as a new post is posted..i want that with every post i should get a image of this page so that i'll have every stage of this page captured in an image
developer
For capturing a web page, have a look at e.g http://stackoverflow.com/questions/1090464/how-to-take-screenshot-of-whole-web-page-rather-than-what-shows-on-the-screen
gnud
i want to do this using php only....how can i do that???
developer
Well, if you're on windows, you can try automating Internet Explorer using COM. Maybe. PHP is not a HTML renderer, so you'll have to use something else to do the rendering. You might be able to control it from PHP, but capturing how a web page looks is not something PHP was made for.
gnud
A: 

Getting a screenshot of a web page isn't an easy task.

You can choose one of the online services that do that for you and you can download the images from there.

Otherwise, I have found a solutions using webkit and python but you will need full access to your linux server in order to install the necessary packages, then you will be able to call that script from php and get your screenshots.

Anonymous