faqts : Computers : Programming : Languages : PHP : Function Libraries

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

A way to verify the existence of a file on a remote server without opening it?

Nov 9th, 2002 13:25
Ken Brill, Storm Warning, www.php.net


Use the file() command

$myurl = "http://www.fuzzygroup.com/file.txt";
if (!file($myurl)) {
    echo "File does not exits";
} else {
    echo "File Exists";
}