Skip to content

Latest commit

 

History

History
34 lines (16 loc) · 501 Bytes

README.md

File metadata and controls

34 lines (16 loc) · 501 Bytes

HTML Web Page Extraction Title and Text

install:

composer require pifeifei/html-parser

use:

use Pifeifei\HtmlParser;

$htmlParser = new HtmlParser();
$url = 'http://baijiahao.baidu.com/s?id=1644885607674637957';

$htmlParser->get($url);

dump($this->htmlParser->getTitle());
dump($this->htmlParser->getContent());

explain:

For normal study only, do not use for illegal purposes. All consequences are borne by the developer, not by the developer.