Fopen help

From: Date: Thu, 22 Mar 2001 21:52:21 +0000
Subject: Fopen help
Groups: php.general 
Request: Send a blank email to php-general+get-45195@lists.php.net to get a copy of this message
I'm trying to use Fopen to check and see if a URL exist with this bit of code. $url=$row[url]; echo "<strong>Old URL = ".$url."</strong><br>"; $urlcheck = fopen($url,"r"); echo "urlcheck = ".$urlcheck."<br>"; switch ($url){ case "": case "http://": echo "<strong>No URL Set</strong><br>"; break; default: switch ($urlcheck){ case 1: echo "<strong>Valid URL</strong><br>"; break; case 0: echo "<strong>URL Is Not Valid</strong><br>"; $url="http://"; break; default: echo "<strong>Fopen Did Not Work</strong><br>"; } break; } echo "<strong>New URL = ".$url."</strong><br>"; So far all I can get it to do is the default response. Can someone point out what I'm doing wrong or tell me how to see what the contents of a resource id is please? Old URL = http://www.s-series.org/htm/firestorm/firestorm.htm urlcheck = Resource id #4 Fopen Did Not Work New URL = http://www.s-series.org/htm/firestorm/firestorm.htm 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 '84 5.0L (307 "Y") Carbed Oldsmobile Delta 88 Royal Brougham. Daily driver until FireStorm is ready. Racing by the Grace of God!!

« previous php.general (#45195) next »