curl-library
Re: How could i known the real IP address
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Dec 2007 12:05:32 +0100 (CET)
Date: Thu, 6 Dec 2007 12:05:32 +0100 (CET)
On Wed, 5 Dec 2007, Bruce Peng wrote:
> I'm trying to download file from a http server using libcurl. The domain
> name in the URL will be redirect to different IP address each time. How
> could i known the IP address while using libcurl to connect to the server?
> someone knowns it?
There's no "proper" way to extract the exact IP address, since libcurl
provides no API to get it. It has been mentioned a lot of times but nobody
every added it.
curl_easy_getinfo( CURLINFO_EFFECTIVE_URL ) can often be used for that info.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-12-06