fork(6) download
  1. <?php
  2.  
  3. $html = <<<EOF
  4. <div class="xGh" style="background-image: url('name_file.jpg');"></div>
  5. EOF;
  6.  
  7. $dom = new domDocument('1.0', 'utf-8');
  8. $dom->loadHTMLFile($html);
  9. $dom->preserveWhiteSpace = false;
  10. $xpath = new DOMXPath($dom);
  11.  
  12. $img = $xpath->query(substring-before(substring-after(//div[@class='xGh']/@style, "background-image: url('"), "')"));
  13.  
  14. echo $img->item($i)->nodeValue."<br/>";
Runtime error #stdin #stdout #stderr 0.01s 82880KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected 'echo' (T_ECHO) in /home/Z11l4f/prog.php on line 15