Created
March 19, 2013 10:08
-
-
Save gabssnake/5194960 to your computer and use it in GitHub Desktop.
get images from html using simple html DOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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