Skip to content

Instantly share code, notes, and snippets.

@gabssnake
Created March 19, 2013 10:08
Show Gist options
  • Save gabssnake/5194960 to your computer and use it in GitHub Desktop.
Save gabssnake/5194960 to your computer and use it in GitHub Desktop.
get images from html using simple html DOM
<?php
require_once('libs/simple_html_dom.php');
$url = "http://gabrielvivas.com";
$html = file_get_html($url);
foreach($html->find('img') as $element) {
echo $element->src;
echo "<img src='$element->src'><br />";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment