王新阳

wangxinyang

php采集、DOM操作

phpQuery
https://blog.csdn.net/summerxiachen/article/details/78681674
https://www.php.cn/faq/568108.html
http://code.google.com/p/phpquery/
http://phpquery-library.blogspot.com/

require_once './phpQuery.php';
phpQuery::newDocumentFile($url);
$title=pq('h1#activity-name')->text();
$author=pq("meta[name='author']")->attr('content');
$summary=pq("meta[name='description']")->attr('content');
$content=pq('div#js_content')->html();

QueryList 基于 phpQuery 实现
https://querylist.cc/
https://github.com/jae-jae/querylist

composer
https://www.phpcomposer.com/

composer中文文档
https://docs.phpcomposer.com/

2023-12-11
2024-11-22 星期五 农历十月二十二