Home  >  Article  >  Backend Development  >  php抓取新闻,该怎么处理

php抓取新闻,该怎么处理

WBOY
WBOYOriginal
2016-06-13 10:05:50943browse

php抓取新闻
想抓取一个网站的新闻大概有30多万条数据,我通过file_get_contents函数肯定会超时的,大家有什么好的方法吗?

------解决方案--------------------
你是想用file_get_contents一下子抓30万条数据?
一个链接用一次file_get_contents不就可以了?
------解决方案--------------------
ini_set("max_execution_time", "60"); ?>

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