php - 使用PHP在CentOS上生成网站截图

标签 php centos web thumbnails

有没有什么免费的实用程序可以用来在centos上截取网页和网站的屏幕截图,并且可以通过php运行。

谢谢

最佳答案

有各种可用的命令行实用程序。最开始browser engines in headless X11之一然后截屏。一个特别常见的是 khtml2png 可以像这样从 php 使用(不确定是否有 CentOS 的预编译版本):

exec("khtml2png --width 800 --height 600 http://google.com/ img.png");

这里列出了更多:Command line program to create website screenshots (on Linux)

关于php - 使用PHP在CentOS上生成网站截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5466038/

相关文章:

php - 在 CentOS7 上安装 Xdebug,出现错误 undefined symbol : compiler_globals

javascript - Jquery hack删除文本框中输入的字符串的一部分

html - 如何显示两种颜色的区域?

python - 在Python中显示选择Mysql查询,输出漂亮且可读

php - 本地化月/日名称列表

php - MySQL 变量字符串查询仅适用于数字而不适用于文本

linux - RedHat如何确定核心数

php - MySQL。需要计算 ~9000 个类别中的帖子数量

javascript - ajax登录表单,重新加载到表单而不是页面

cassandra - 在 Centos 6.7 上运行 cassandra-stress 时出错