"John Kelly" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How do I check if a remote file exists that is in a directory protected by > an .htaccess file? >
I should have added that this is the code I have tried without success ... $url = "www.domain.com"; $file = "/directory/file.php"; $fid = fsockopen($url,80); fputs($fid,"GET $file HTTP/1.0\r\nHost: $url\r\n\r\n"); $gets = fgets($fid, 1024); fclose($fid); if (ereg("HTTP/1.1 200 OK", $gets)) { echo "file exists"; } else { echo "file missing"; } If I remove the .htaccess file it works fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php