Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- //$url = 'http://www.domain.com/somefile.jpg';
- function MapImgExists($url){
- $ch = curl_init($url);
- $file_headers = @get_headers($url);
- if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
- $exists = false;
- } else {
- $exists = true;
- }
- return $exists;
- }
- if (isset($_GET["url"])) {
- $url = $_GET['url'];
- $real = MapImgExists($url);
- echo "<p>".$real."</p>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement