PHP:如何使用 php 捕获浏览器窗口屏幕? [英] PHP: How to capture browser window screen with php?

查看:29
本文介绍了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.

这篇关于PHP:如何使用 php 捕获浏览器窗口屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆