Advertisement
Exho

Untitled

Oct 22nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <html>
  2. <body>
  3.  
  4. <?php
  5. //$url = 'http://www.domain.com/somefile.jpg';
  6.  
  7. function MapImgExists($url){
  8. $ch = curl_init($url);
  9. $file_headers = @get_headers($url);
  10. if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
  11. $exists = false;
  12. } else {
  13. $exists = true;
  14. }
  15. return $exists;
  16. }
  17.  
  18. if (isset($_GET["url"])) {
  19. $url = $_GET['url'];
  20. $real = MapImgExists($url);
  21. echo "<p>".$real."</p>";
  22. }
  23. ?>
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement