用fsockopen获取百度的搜寻页

WBOY
Release: 2016-06-13 11:41:36
Original
807 people have browsed it

用fsockopen获取百度的搜索页
我用php的函数fsockopen和fwrite,fgets等命令可直接获得http://www.baidu.com主页的内容,但却不能获得http://www.baidu.com/s?wd=音箱&pn=20的内容,甚是苦闷,觉得是百度做了防范了,但奇怪的是我将浏览器中所有的缓存和cookie都清除掉了,直接用地址栏访问http://www.baidu.com/s?wd=音箱&pn=20,却能够直接获得内容,但用php函数获取,却怎么也不行。百度是怎么能够区别出浏览器访问和程序访问的呢?哪位达人能说说原因和指点下迷津吗。
我没更多分了,用钱买php解决方案也行啊

php? fsockopen
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