当前位置:Gxlcms > PHP教程 > php自动点击其他网站的按钮如何做

php自动点击其他网站的按钮如何做

时间:2021-07-01 10:21:17 帮助过:26人阅读

php自动点击其他网站的按钮 怎么做?

RT 我的网站后台需要一项功能 想每隔5分钟自动点击百度主页的搜索按钮 请问这个功能能不能实现 应该怎么做?谢谢

------解决方案--------------------
$html_text=php file_get_contents('http://www.baidu.com/s?wd=搜索关键字');

$html_text中就是搜索结果。
------解决方案--------------------
有三种方法:
1.curl
2.socket
3.stream
三种方法都可以实现,模拟用户点击。

人气教程排行