On 11 May 2006, at 03:05, [EMAIL PROTECTED] wrote:

Can anyone tell me if it's possible to detect whether an URL is being
re-directed, using load URL or some other command?

I'd like to see if there's a way I can get the following status from a
server when loading an URL, but I'm not sure how to retrieve it:

302 Success: Found Redirected to: (url)
200 Success: OK
301 Success: Moved Permanently

Can anyone point me in the right direction?


There is a libUrlFollowHttpRedirects command. This seems to have been omitted from the 2.6.1 docs. :-( You can get information here:

http://www.lacscentre.co.uk/liburl/ liburldoc.html#libUrlFollowHttpRedirects

If you set this to false, a "get url" call to such a url will return the relevant response in "the result", like this:

 error 302 found

You could then use the libUrlLastRHHeaders function to see the full response from the server, for example if you needed to parse out the "Location:" header, and handle the redirect yourself.

Cheers
Dave

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

Reply via email to