图像抓取窗口 + https=黑屏

发布于 2024-09-04 14:33:52 字数 734 浏览 0 评论 0原文

我正在做一些愚蠢的事情,并试图捕获 html 网页的缩略图、快照、图像。

我正在做一些事情:

我如何使用 PHP 获取网页的快照或缩略图?

DCOM + IE + PHP(imagegrabwindow;手册中的示例)

一切都很完美,直到我尝试捕获 HTTPS 网站。例如https://mail.google.com

imagegrabwindow 生成一个 png,但它只显示浏览器。浏览器的内容是黑色的。如果我退出谷歌,我可以捕获浏览器窗口及其内容 - 我第二次登录时,内容(不是浏览器框架)是黑屏。

是的,我增加了超时(在关闭浏览器窗口之前)。 IE 显然已经加载了页面,它只是拒绝为 imagegrabwindow 渲染。

我已经奋斗了足够长的时间,我知道这要么是权限问题,要么是服务需要与桌面交互。

有谁知道需要设置哪些权限或需要访问哪些服务?

我假设了加密服务,但它是作为网络服务运行的,并且尝试将其更改为交互方式会使其大声喊叫并继续运行。

这是拼图的最后一块,我真的很想让它发挥作用。谢谢你!

I'm doing something stupid and trying to capture thumbnails, snapshots, images of a html webpages.

I'm doing something along the lines of:

How might I obtain a Snapshot or Thumbnail of a web page using PHP?

DCOM + IE + PHP (imagegrabwindow; example from manual)

Everything works PERFECT until I try to capture a HTTPS website... https://mail.google.com for example.

imagegrabwindow produces a png, but it only shows the browser. the contents of the browser are black. If I log out of Google, I can capture the browser window and the contents thereof - the second I log in, the contents (not the browser frame) are black screen.

Yes, I've increased the timeout (before closing the browser window). IE has clearly loaded the page, it just refuses to render for imagegrabwindow.

I've been fighting this long enough I know it's either a permissions problem or a service needs to interact with the desktop.

Does anyone have any clue what permissions need to be set or which service needs access?

I assumed cryptographic services, but that's run as a network service and trying to change it to interact makes it shout and carry on.

This is the last piece of the puzzle, I'd really like to get it working. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文