問題描述
首先,我不確定是否可以使用 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 捕獲瀏覽器窗口屏幕?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!