note 98128 modified in function.fopen by danbrown

From: Date: Thu, 27 May 2010 15:54:12 +0000
Subject: note 98128 modified in function.fopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-169660@lists.php.net to get a copy of this message
Since the http-wrapper doesn't support stat() and so you can't use file_exists() for url's, you can simply use a function like this: <?php function http_file_exists($url) { $f=@fopen($url,"r"); if($f) { fclose($f); return true; } return false; } ?> --was-- Since the http-wrapper doesn't support stat() and so you can't use file_exists() for url's, you can simply use a function like this: function http_file_exists($url) { $f=@fopen($url,"r"); if($f) { fclose($f); return true; } return false; } http://php.net/manual/en/function.fopen.php

« previous php.notes (#169660) next »