问题
I am using php and I want to take a snapshot of my web page using php. Something similar to this
http://www.moneycontrol.com/gd/mail_indices.php
How can i do that?
回答1:
The fastest and surest way in PHP to create images is to look at the GD Library. They have tons of functions to help you create your image easily.
Should you need a font that is available in Windows Font but not in PHP font, you can use this tool to convert it: http://www.wedwick.com/wftopf.exe
回答2:
To take Snapshots of a website, and not as proposed generate an image with text in it, you can use either
http://iecapt.sourceforge.net/ for snapshots using IE's rendering engine or http://cutycapt.sourceforge.net/ for Webkit (Safari/Chrome) snapshots
I strongly recommend the latter.
回答3:
You can use Imagemagick.
回答4:
Theres is a comprehensive summary of image creation option in Php here. The other option not already mentioned is Cairo.
来源:https://stackoverflow.com/questions/1480793/how-can-i-make-a-snapshot-image-of-a-web-page-in-php