Created
May 31, 2016 12:22
-
-
Save Venugopal155/0277130db9407d434424b492a2b0b69f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
$html = file_get_contents('http://venugopalphp.wordrpess.com'); | |
$dom = new domDocument; | |
@$dom->loadHTML($html); | |
$dom->preserveWhiteSpace = false; | |
$images = $dom->getElementsByTagName('img'); | |
$i=0; | |
foreach ($images as $image) { | |
echo '<img src='.$image->getAttribute('src').'>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment