shell_exec 在调用 ConvertHTMLtoImage 时冻结
我有一个正在运行的机器人,对我的网站上链接的网站进行预览捕获。我使用一个名为 converthtmltoimage 的程序。抓取大拇指的程序运行在Windows服务器上。我通过 shell_exec 使用命令行选项。然而...converthtmltoimage 在某些网站上有冻结的倾向。导致命令不被执行并冻结我的 PHP 代码。
我可以做什么来解决这个问题?我认为要么在 shell_exec 上启用某种超时,要么使用 Converthtmltoimage 的替代方案......
I have a bot running taking preview captures of sites linked on my site. I use a program called converthtmltoimage for that. The program grabbing the thumbs is running on a windows server. I use the command line option through a shell_exec. However... converthtmltoimage has the tendency to freeze on certain websites. Resulting in the command not being executed and freezing my PHP code as well.
What can I do to resolve this? Either enabling some sort of timeout on the shell_exec or an alternative to converthtmltoimage I would assume...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
请注意,仅适用于 Windows!
Try this:
Mind you, only works on Windows!