RE: [PHP] fopen to validate a URL

2001-03-15 Thread ..s.c.o.t.t.. [gts]
, 2001 4:58 PM > To: PHP > Subject: Re: [PHP] fopen to validate a URL > > > Well I changed the code to this expecting a true or false response (1 or 0) > > $url=$row[url]; > echo "Old URL = ".$url.""; > > $fp = fopen("$url","r

Re: [PHP] fopen to validate a URL

2001-03-15 Thread Kenneth R Zink II
Well I changed the code to this expecting a true or false response (1 or 0) $url=$row[url]; echo "Old URL = ".$url.""; $fp = fopen("$url","r"); echo "fp = ".$fp.""; //Debug line to see what $fp is returning switch ($fp){ case 1: echo "Valid URL"; break; case 0: echo "URL IS NOT VALID"; $url="