cURL / Mailing Lists / curl-library / Single Mail

curl-library

Getting the actually fetched URL

From: Tomas Franzén <tomas_at_lightheadsw.com>
Date: Thu, 11 Aug 2005 15:56:17 +0200

Hi,

I'm using libcurl to fetch web pages based on user-specified URLs and
URLs I get from other web pages.
Let's say the user enters "www.apple.com" as the URL. cURL then
resolves this to the complete url "http://www.apple.com".
How can I know what URL this was resolved to?

Similar problem:
When using the CURLOPT_FOLLOWLOCATION option, cURL follows any
redirects. How can I know the URL of the final page it actually
delivered to me?

There must be some way of getting this info that I'm missing. :-)

Thanks,

Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/
Received on 2005-08-11