cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Getting the actually fetched URL

From: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Thu, 11 Aug 2005 10:20:38 -0400

On 8/11/05, Tomas Franzén <tomas_at_lightheadsw.com> wrote:
> 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?

CURLOPT_URL description / curl_easy_getinfo()

> 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?

curl_easy_getinfo()

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

Read the fine manual? ;)

Lars Nilsson
Received on 2005-08-11