tobitaz

urlgraberonly.php

Jun 7th, 2021 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2.  
  3. #config
  4. $cxt2 = "jpg";
  5. $cxt = "jpeg";
  6. $url = "http://";
  7.  
  8.  
  9.  
  10. $f = file_get_contents($url);
  11. $pat = '/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i';
  12.  
  13. preg_match_all($pat,$f ,$anu);
  14.  
  15.  
  16.  
  17. foreach($anu[0] as $phc)
  18. {
  19. #cek extension
  20. $cekjpg2 = stripos($phc, $cxt);
  21. $cekjpg = stripos($phc, $cxt2);
  22.  
  23. if($cekjpg > 0 || $cekjpg2 > 0)
  24. {
  25. echo $phc."<br />";
  26. }
  27.  
  28. }
  29.  
  30. ?>
Add Comment
Please, Sign In to add comment