Have a look at the fopen() function in the FileSystem Function section of the Docs. fopen() can open a file over http:// and I imagine it returns FALSE if it cant open it. If it doesn't return false, you could analyse the headers in $http_response_header.
Hope this helps. Cheers, Owen Prime http://www.noggin.com.au Adrian Slusarczyk wrote: > Hi, > > I'm kinda new to PHP and have the following problem: In a function, I want > to verify whether a > file exists before I go on, and if it doesn´t, return false and stop right > there. So I tried > > if(!file_exists($my_file)) { > return false; > exit; > } > > But since $my_file is a URL, it doesn´t work. Does anybody know how to do > this so it works with URLs, i.e. w/o using file_exists() ? > > Thx! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php