Hello Andre, Hello Jan,
Thank you very much!
Richard.



Message: 11
Date: Sun, 2 Sep 2007 21:46:29 +0200
From: "R. Hillen" <[EMAIL PROTECTED]>
Subject: test if file exists on http-server
To: use-revolution@lists.runrev.com
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hello list,

I have to check some hundred files, if they are available on  http-
server; as they are big, is there another way than to try to download
them?

Thank you!
Richard.


...



Richard,
use the HEAD method. it will respond with the headers only, no content.
check the follwing entries in the documentation.

libURLSetCustomHTTPHeaders (you'll use that to assemble a HEAD request
instead of a GET one)


libURLLastRHHTTPHeaders (use this to check what the server answered.)

you may find additional info on the HTTP protocol by reading

http://www.jmarshall.com/easy/http/

best
andre



That's what the 'HEAD' command is for, but since that
doesn't seem to be in libURL, here's a helper function
that I cooked up.

##
on mouseUp
...

end qrtHTTP_FileExists
##

This function does not take into account the
possibility that the file was moved and there's a
redirect to the new location. If you don't intend on
moving the file, the above should work just fine.

Hope this helped,

Jan Schenkel.


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to