cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Dowloading html code from a page

From: Amr Shahin <amrnablus_at_gmail.com>
Date: Thu, 24 Feb 2011 14:53:28 +0200

try this

static int write (char *data, size_t size, size_t nmemb, void *userdata) {
        int i=0;
        for( i=0 ; i<size*nmemb ; i++ ) {
                printf( "%c" , data[i] );
        }
}

On Thu, Feb 24, 2011 at 2:13 PM, Krosh Ivanov <krosh.ivan_at_gmail.com> wrote:

> Hi folks,
> I'm using libcurl to download the html code from pages and I wrote an
> example code (http://paste.ideaslabs.com/show/NB1GiG6IGx) for that, but I
> got a problem. When I put the app to access a page and then to download the
> code, the begin of the code only is downloaded. What looks wrong in the
> code?
>
> Thanks in advance,
> Ivan
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-24