php scraping

%e7%84%a1%e9%a1%8c

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&#91;"title"&#93;->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&#91;".stoksPrice"&#93;->text();