I am using a simple code to open files from other internet sites and then using ereg() to evaluate the string and pull out the information that I need and then store the data in a database. Everything works fine that is until I come across a file that does not exsist. Here is a short version of the script where I am having problems:
$url = "http://www.phpbuilder.com/";
if(!($file = file( $url, "r" )))
{
echo "file does not exsist";
}
else
{
$buffer = implode( "\n", $file);
}
If the file DOES not exsist I get two general warning message saying that it doesn't exsist, the one that I have in the "if" statement and another generated by my server. So really the question is how do I get it to not display the server warning message. I tried to evaluate it with file_exsist() first but it never exsists when I do that. BTW- these are not file on my own server. Any suggestions would be great.
Thanks.