Okay... I can't figure out why this isn't working...
When I enter in a valid URL this function works fine...
The problem is when I enter an invalid url, rather
than getting my (semi) friendly die error I get
Warning: fopen("http://www.foxjet.com/html/fjmain.html","r") - Unknown error in
/home/www/foxjet/admin/mailer.php on line 37
Warning: Supplied argument is not a valid File-Handle resource in
/home/www/foxjet/admin/mailer.php on line 38
Warning: Supplied argument is not a valid File-Handle resource in
/home/www/foxjet/admin/mailer.php on line 39
Here is my function (With Line numbers added)
31: Function CreateMessage($url,$boundary)
32: {
33:
34: if (substr($url,0,7) != "http://")
35: $url = "http://" . $url;
36:
37: $fp = fopen($url,"r") or die("Page $url Not Found!");
38: $buffer = fread($fp, 100000);
39: fclose($fp);
/* More Code */
65: }
Any ideas? Am I overlooking something?
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com