Posted by Daniel Tryba on 07/06/05 15:12
Pero <pero@nomailindex.hr> wrote:
> ... validate some external .jpg exists by url?
>
> func. file_exists(http://url_to_navigate.jpg), doesn't work, and I need
> something like this.
>
>
> ------------------------------------
> if(--validate http://something.jpg exists--){
HTTP provides status codes to inform you incase an URL doesn't exist.
You could use curl like already suggested or in the absence of it you
could simply open a socket to the host and do a HEAD request for the
URL and see what you get back. All status codes are defined in RFC2616
for HTTP/1.1
Navigation:
[Reply to this message]
|