0

I have a dynamic web site (php/mySQL/Ajax on a Linux server), I need to take automatically a photo (snapshot) of each web page periodically (If I can find the way to do the snapshot... I can use cron) and save this image to the database (I also know how to do this...my only problem is the photo!).

I can't do it manually, so I need an script which take the snapshop for me, without displaying the web page, i.e directly from the .php files.

How is it possible?

Thanks!

Carolina
  • 21
  • 3

3 Answers3

3

http://browsershots.org/ may work for you, they have an api

JeremyWeir
  • 24,118
  • 10
  • 92
  • 107
0

Looks like this might answer your question, I have seen it done with php and flash but wasn't privy to the inner workings, if the link doesnt help then you could research that route.

  • I know this might be an out of scope suggestion but you could try to use [link]phantom.js.org which would solve your problem nicely, but may require a bit of node.js (which can run on lamp stacks) – NukeOurLimo Sep 25 '14 at 16:29
0

You can use the GD functions imagegrabscreen() or imagegrabwindow() to take a screenshot.

Note that they're only available on Windows at the moment.

Sarfraz
  • 377,238
  • 77
  • 533
  • 578