Home > Backend Development > PHP Tutorial > php自动点击其他网站的按钮 如何做

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

WBOY
Release: 2016-06-13 10:12:38
Original
1881 people have browsed it

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

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

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

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template