Home  >  Article  >  Backend Development  >  curl真的没有对采集内容进行字节限制的设置么?例如小弟我只想要网页的header部分的keyword,全部都采集过来的话太浪费了

curl真的没有对采集内容进行字节限制的设置么?例如小弟我只想要网页的header部分的keyword,全部都采集过来的话太浪费了

WBOY
WBOYOriginal
2016-06-13 10:46:33795browse

curl真的没有对采集内容进行字节限制的设置么?例如我只想要网页的header部分的keyword,全部都采集过来的话太浪费了
如题!

------解决方案--------------------
手册上说 
CURLOPT_NOBODY TRUE to exclude the body from the output
google说 to exclude the body from the output 从输出中排除身体
并没有说不取得全部内容


get_headers 返回全部头信息
get_meta_tags 从一个文件中提取所有的 meta 标签 content 属性

自己掂量着办

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