cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl produces 0byte files for some refered links

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 7 Oct 2008 10:15:45 -0700

On Tue, Oct 07, 2008 at 11:02:24AM +0200, mr orgi wrote:
> i have some problems using libcurl in my program.
>
> if i run it for example for all sublinks of news.google.com some links are
> stored as 0byte files.
>
> some examples of these links:
> http://mail.google.com/mail/?hl=nl&tab=nm
> http://www.google.com/calendar/render?hl=nl&tab=nc
>
> these are all links which are refered to another link.. i have read the
> manpages and FOLLOWLOCATION should be the solution for this problem. but for
> some links it still not works.

This could be due to a number of problems (e.g. cookies, user-agent).
Read http://curl.haxx.se/docs/httpscripting.html for more details.

> my curl options are the following:
>
> CURL *curl;
> curl = curl_easy_init();
> curl_easy_setopt(curl, CURLOPT_URL, link);
> curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
> curl_easy_setopt(curl, CURLOPT_MAXREDIRS, -1);

Note that these must be long integers, not plain ints.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-10-07