Re: url exist?

From: Date: Fri, 16 Nov 2001 07:39:15 +0000
Subject: Re: url exist?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74827@lists.php.net to get a copy of this message
Looks like you might be able to use the cURL extensions <http://www.php.net/manual/en/ref.curl.php> - there's a function called curl_getinfo which returns an array which includes http_code - you could check the value of that to see whether the file was available (http_code == 200), not found (http_code == 404), or whatever (<http://www.w3.org/Protocols/HTTP/HTRESP.html>). Have fun! jtjohnston wrote:
Any way of finding out if this exists? http://www.somewhere.com/image.jpg if yes {} else {};


« previous php.general (#74827) next »