developer
developer

Reputation: 2050

how to create an image of dynamic data in php

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!!

Upvotes: 0

Views: 862

Answers (3)

yann.kmm
yann.kmm

Reputation: 837

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.

Upvotes: 0

gnud
gnud

Reputation: 78518

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.

Upvotes: 1

Related Questions