如何从 php 脚本生成的 Web 中检索图像
How to retrieve an image from web generated from a php script
基本上,我想以编程方式从 projecteuler.net 站点检索由 PHP 脚本生成的图像(验证码),以实现自动化目的。
我该怎么做?
这是来自 html 来源的代码
<img src="captcha/show_captcha.php" id="captcha_image" onclick="javascript:this.src='captcha/show_captcha.php?'+Math.random();" style="border:1px solid #999;" /><br />Click image for new code
假设您想在 PHP 中以编程方式执行此操作:使用简单的网络蜘蛛工具(例如 http://www.sphider.eu/)或任何其他方法访问 DOM 并获取图像方法。
这是 post 提供的解决方案可能符合您的要求:
https://www.daniweb.com/web-development/php/threads/340460/php-image-crawlerspider
基本上,我想以编程方式从 projecteuler.net 站点检索由 PHP 脚本生成的图像(验证码),以实现自动化目的。
我该怎么做?
这是来自 html 来源的代码
<img src="captcha/show_captcha.php" id="captcha_image" onclick="javascript:this.src='captcha/show_captcha.php?'+Math.random();" style="border:1px solid #999;" /><br />Click image for new code
假设您想在 PHP 中以编程方式执行此操作:使用简单的网络蜘蛛工具(例如 http://www.sphider.eu/)或任何其他方法访问 DOM 并获取图像方法。 这是 post 提供的解决方案可能符合您的要求: https://www.daniweb.com/web-development/php/threads/340460/php-image-crawlerspider