, 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
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="
2 matches
Mail list logo