RE: [PHP] url exist?

From: Date: Fri, 16 Nov 2001 07:33:40 +0000
Subject: RE: [PHP] url exist?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74825@lists.php.net to get a copy of this message
Hello! The simpliest way: $f = @fopen("http://foobar.baz/somefile.ext", "r"); if ($f) { fclose($f); echo "exists!" } else { echo "no exists!" } Best regards, Andrew Kirilenko. > -----Original Message----- > From: jtjohnston [mailto:taylorjo@collegesherbrooke.qc.ca] > Sent: Friday, November 16, 2001 9:16 AM > To: php-general@lists.php.net > Subject: [PHP] url exist? > > > Any way of finding out if this exists? > > http://www.somewhere.com/image.jpg > > if yes {} else {}; > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#74825) next »