如何使用服务器端脚本生成网页的屏幕截图? [英] How can I generate a screenshot of a webpage using a server-side script?
本文介绍了如何使用服务器端脚本生成网页的屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个服务器端脚本(PHP,Python)才能将网页捕获为PNG,JPG,Tiff,GIF图像并将其大小调整为缩略图.
I need a server-side script (PHP, Python) to capture a webpage to a PNG, JPG, Tiff, GIF image and resize them to a thumbnail.
完成此任务的最佳方法是什么?
What is the best way to accomplish this?
- Web Page Screenshots with PHP?
- How can I take a screenshot of a website with PHP and GD?
- How might I obtain a Snapshot or Thumbnail of a web page using PHP?
推荐答案
您可能可以编写类似于 webkit2png ,除非您的服务器已经在运行Mac OS X.
You can probably write something similar to webkit2png, unless your server already runs Mac OS X.
更新:我刚刚看到了其Linux等效链接: khtml2png
UPDATE: I just saw the link to its Linux equivalent: khtml2png
另请参阅:
- Create screenshots of a web page using Python and QtWebKit
- Taking automated webpage screenshots with embedded Mozilla
这篇关于如何使用服务器端脚本生成网页的屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文