curl-users
getting the final redirected url...
Date: Tue, 24 May 2011 22:43:08 +0530 (IST)
Given an ip address/domain name, I wish to get the final URL where the browser would land, after all the redirects that may happen to the address/domain name.
For example, if I had typed "bru01s01-in-f103.1e100.net" in the browser, it would have led me to "http://www.google.co.in/". I would like to have this Google URL as the result of a Curl command.
Well, I could type it in the browser, but that's not what I want. Eventually, I am looking for this action, to find the final redirected URL for a long list of ip addresses. If I can get curl do this for a single one, I can work out how to do it for a list.
How to accomplish this with Curl ?
I know I might be being shameless here, but I request if someone can write a sample line of command to do just the above. Instead of just mentioning what parameters to be try out and how ? I have tried some -e, -I, -L etc, and doesn't seem to get it right. Not a commandpromptuous guy :).
I am running curl from the windows command prompt on Windows XP Professional as Administrator. No problems running curl, and the sample command "curl http://curl.haxx.se" works just fine.
Thanks for your time.
Regards
Sri
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-24