Jennifer, works just fine here.. --------- $fp = fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe ed","r"); if ($fp !== FALSE) echo "The file exists!"; else echo "The file does not exist"; ---------
This prints "The file exists!" so it may be something else in your code cuasing the problem. And when I read the file it displays a bunch of numbers. Don't know what you could be doing wrong but if you continue to experiece problems post some more of your code and maybe we can decipher the error from that. -Kevin ----- Original Message ----- From: "jennifer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 2:09 PM Subject: [PHP] fopen failing to connect > Hello > > I have a script which uses fopen( ). It works on my local machine which has > php and apache on a windows platform as well as on another server > (php/apache) which is windows based. However, when I have the same script on > a unix machine (php/apache), the fopen gives me the following error: > > > Warning: php_hostconnect: connect failed in > /usr/local/apache/htdocs/514parser.php on line 135 > > Warning: > fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe ed", > "r") - Bad file number in /usr/local/apache/htdocs/514parser.php on line 135 > Any suggestions? > > -jennifer > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php