fork(2) download
  1. <?php
  2.  
  3. $doc = new DOMDocument();
  4. $doc->loadHTML("<html><body>Test<br><img src=\"myimage.jpg\" title=\"title\" alt=\"alt\"></body></html>");
  5. $xml = simplexml_import_dom($doc);
  6. $images = $xml->xpath('//img');
  7. foreach ($images as $img) {
  8. echo $img['src'];
  9. }
Success #stdin #stdout 0.03s 52432KB
stdin
Standard input is empty
stdout
myimage.jpg