Home  >  Article  >  Backend Development  >  php getheaders的有关问题 (curl也会有这个有关问题)

php getheaders的有关问题 (curl也会有这个有关问题)

WBOY
WBOYOriginal
2016-06-13 12:06:051010browse

php getheaders的问题 (curl也会有这个问题)
代码如下

结果如下

为什么有些请求失败了

和服务器有关吗?这个是百度的服务器地址(买的百度关键字,得到的url)

------解决方案--------------------
可能是请求太频繁了
------解决方案--------------------
sleep 久一点呢,实在不行,检查为bool后再次请求一下。

Statement:
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