cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with curl_easy_getinfo

From: codemastr <codemstr_at_ptd.net>
Date: Fri, 25 Jun 2004 13:15:06 -0400

The response code is the HTTP response code. For example, 404 when a page is
not found, 500 when the server has an error, 401 when authentication fails,
etc. It is not the contents of the page. If you want to retrieve the
contents of the page, then you need to look at the CURLOPT_WRITEFUNCTION
setting.

-- codemastr

----- Original Message -----
From: "Marek Elsner" <marek_at_icom.pl>
To: <curl-library_at_cool.haxx.se>
Sent: Friday, June 25, 2004 1:05 PM
Subject: Problem with curl_easy_getinfo

Hello,

I am newbie, so probably my problem will sound funny.
;-)

If I want to write last URL into variable "m" I am using
curl_easy_getinfo(curl,CURLINFO_EFFECTIVE_URL,&m); and everything is ok.

Now I would like to write whole content of the webpage into "m" variable.
So I think I should use CURLINFO_RESPONSE_CODE, but when I am trying to do:

(curl,CURLINFO_RESPONSE_CODE,&m); it does not work.

On http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html I read that
CURLINFO_RESPONSE_CODE will pass a pointer to a long.
But content of the page will not be long ( I suppose long means long int).

Maybe someone will show me where I made it wrong because now I am totally
lost.
:-D

thank

Marek Elsner
Received on 2004-06-25