How might I obtain a Snapshot or Thumbnail of a web page using PHP?

前端 未结 5 1652
粉色の甜心
粉色の甜心 2020-12-19 15:41

I need to create Snapshots / Thumbshots / Site preview a-site.com.

There are some site as thumbshot.org that meets with I need. But I do not want to use an external

5条回答
  •  旧时难觅i
    2020-12-19 16:37

    There isn't anything in the PHP library to do this - you're looking at setting up an external application (with a queue) to take images, although you can of course use PHP to add items to the queue.

    There are a couple of Windows functions in GD that takes screen shots of the computer (webserver - not the client) so perhaps you could write a script in PHP to do this.

    Edit: Was thinking of these: imagegrabscreen and imagegrabwindow. I'm not sure they will do what you want however (even in full screen mode Firefox has ablue bar at the top of the screen - not sure about other browsers). However, Pierre has something on these functions if you're interested.

    I'd suggest writing an application in another language (I assume .NET has something) to do this for you. Edit: This page tells you how to do it in C#

提交回复
热议问题