Re: [PHP] Checking url validation

2002-03-29 Thread Billy S Halsey
Oops ... That's not balanced. Add another ) at the end of the if. /bsh/ Billy S Halsey wrote: > Try an extra layer of parens: > > if (($fp = fopen("http://www.anyurl.com";, "r") == NULL) > { > echo "not valid"; > } > else > { > echo "this is a valid url"; > } > > > Roberts, Mark wrote

Re: [PHP] Checking url validation

2002-03-29 Thread Billy S Halsey
Try an extra layer of parens: if (($fp = fopen("http://www.anyurl.com";, "r") == NULL) { echo "not valid"; } else { echo "this is a valid url"; } Roberts, Mark wrote: > I am using the following to verify a url: > > if (!$fp = fopen("http://www.anyurl.com";, "r")) > { > ec

[PHP] Checking url validation

2002-03-29 Thread Roberts, Mark
I am using the following to verify a url: if (!$fp = fopen("http://www.anyurl.com";, "r")) { echo "not valid"; } else { echo "this is a valid url"; } I always get a not valid message. What am I doing wrong? Is there a better way to do this? Mark Roberts Sr. Systems Analyst LanAp