Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. $dom = new DOMDocument();
  4. $dom -> loadHTMLFile('http://sakhalin.name/g.php');
  5.  
  6. $img_a = $dom -> getElementsByTagName('img');
  7.  
  8. if (empty($img_a)) {
  9.     return;
  10. }
  11.  
  12. echo '<html><head><meta charset="utf-8"></head><body>';
  13.  
  14. foreach ($img_a as $img) {
  15.     $src = $img->getAttribute('src');
  16.     $alt = $img->getAttribute('alt');
  17.  
  18.     echo '<p><img src="http://lunach.ru/?cum=&url=' . htmlentities($src). '&tpl=vk"><br /><i>' . $alt . '</i></p>';
  19. }
  20.  
  21. echo '</body></html>';
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement