
download from this site:
https://code.google.com/archive/p/phpquery/downloads
<?php
//require
require_once('phpQuery-onefile.php');
//ページ取得
$html = file_get_contents('./index.html');
//DOM取得
$doc = phpQuery::newDocument($html);
//要素取得
echo $doc["title"]->text();
yahoofinanceから任天堂の株価をスクレイピング
<?php
//require
require_once('phpQuery-onefile.php');
//ページ取得
$html = file_get_contents('http://stocks.finance.yahoo.co.jp/stocks/detail/?code=7974.t');
//DOM取得
$doc = phpQuery::newDocument($html);
//要素取得
echo $doc[".stoksPrice"]->text();