fopen() question
| From: | Tony | Date: | Thu, 06 Jun 2002 18:46:20 +0000 |
| Subject: | fopen() question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19650@lists.php.net to get a copy of this message | ||
I have a database and I am writing a script to auto-update some information
in the database.
That requires me to read data from database, find the URL, read the URL,
find the information I want, then update it in the database.
My problem is, for example I read one record from database who's URL is
http://www.somedomain.com/.
And I try to read the URL with fopen() for information:
$fp = fopen(³http://www.comedomain.com/², ³r²);
if (!$fp)
{
echo ³URL not available.²;
exit;
}
If the URL is available, things will work fine.
But if the URL is NOT available, I will get a error saying ³attempt to load
file ³MyFile¹s URL² failed² from browser.
It¹s supposed to output the string ³URL not available², isn¹t it?
Anyone know how to get around with this?
Tony S. Wu
tonyswu@mac.com