PHP:如何使用 php 捕获浏览器窗口屏幕?
首先,我不确定是否可以使用 php 捕获浏览器窗口屏幕,然后怎么办?
First of all, i am not sure, if it is possible to capture browser window screen with php, then how to do it?
如果可能,最好只捕获网站内容,不包括菜单栏、工具栏、状态栏等浏览器部分.
If it is possible, the best will be to capture just the website content excluding browser parts such as menubar, toolbar, statusbar, etc.
谢谢
推荐答案
有imagegrabscreen()
和 imagegrabwindow()
,这将允许您通过 COM 从运行在同一台机器上的浏览器以编程方式创建屏幕截图(但仅限 Win).有关如何省略浏览器的 chrome 的信息,请参阅手册中的注释.启用 DCOM 后,这也适用于已设置为允许通过 DCOM 访问.
There is imagegrabscreen()
and imagegrabwindow()
, which would allow you to programmatically create screenshots from a browser running on the same machine via COM (Win only though). See the comments in the manual for how to omit the browser's chrome. With DCOM enabled, this would also work with remote windows machines that have been setup to allow access through DCOM.
对于那些说 PHP 不了解浏览器的人的旁注,我建议看看 get_browser()
在 PHP 手册中.不算多,但嘿,不算什么.
On a sidenote for those that said PHP does not know about the browser, I'd suggest a look at get_browser()
in the PHP manual. It's not much, but hey, it's not nothing.
相关文章