fopen to validate a URL

From: Date: Thu, 15 Mar 2001 21:39:57 +0000
Subject: fopen to validate a URL
Groups: php.general 
Request: Send a blank email to php-general+get-44137@lists.php.net to get a copy of this message
How would I use FOPEN to validate a URL? here is what I already have and it's not working properly. $url=$row[url]; echo "Old URL = ".$url."<br>"; $fp = @fopen($url,"r"); if ($fp){ echo "Valid URL<br>"; }else{ echo "URL IS NOT VALID"; $url="http://"; } echo "New URL = ".$url."<br>"; Kenneth R Zink II Hellcat1@S-Series.Org ICQ# 5095094 '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!! http://www.s-series.org/htm/windstorm/project-windstorm.htm '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!! http://www.s-series.org/htm/firestorm/firestorm.htm Racing by the Grace of God!!

« previous php.general (#44137) next »