MakStashkevich

Получить все IMG ссылки на PHP

Nov 8th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. ///////////////////// ПОЛУЧИТЬ ВСЕ IMG ССЫЛКИ НА PHP /////////////////////
  2.  
  3. $file_content = file_get_contents("http://htmlweb.ru/index.php");
  4.  
  5. preg_match_all("/(<img )(.+?)( \/)?(>)/",$file_content,$images);
  6. foreach ($images[2] as $val)
  7. {
  8.     if (preg_match("/(src=)('|\")(.+?)('|\")/",$val,$matches) == 1)
  9.         echo $matches[3] . "<br />";
  10. }
Advertisement
Add Comment
Please, Sign In to add comment