fork download
  1. <?php
  2. $html = file_get_contents('http://m...content-available-to-author-only...x.ru/model-spec.xml?modelid=6175532&hid=91491');
  3. $dom = new DomDocument();
  4. $dom->loadHTML($html);
  5.  
  6. $xpath = new DomXPath($dom);
  7.  
  8. $_res = $xpath->query("html/body/div[2]/table/tbody/tr/td[2]/table");
  9.  
  10. foreach($_res as $obj) {
  11. var_dump($obj);
  12. echo 'class: '.$obj->getAttribute('class');
  13. echo $obj->nodeValue;
  14. }
Success #stdin #stdout #stderr 0.01s 20592KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/i1zpVn/prog.php on line 2
PHP Warning:  file_get_contents(http://m...content-available-to-author-only...x.ru/model-spec.xml?modelid=6175532&hid=91491): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/i1zpVn/prog.php on line 2
PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in /home/i1zpVn/prog.php on line 5