curl-library
Re: Function to return the body of a page?
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Wed, 13 Mar 2002 20:21:39 +0100
Date: Wed, 13 Mar 2002 20:21:39 +0100
On Wed, 13 Mar 2002 12:12:14 -0700, VanL wrote:
> Hello,
>
> I am trying to use libcurl to communicate between some programs.
> Simple.c appears to be mostly what I need, I was just going to
> pass in a char * that contained the URL of the two computers I
> will need to get info from.
>
> Is there a way to modify simple so that it returns the body of the
> page as a string?
You should look at getinmemory.c instead, That example does exactly
what you describe.
> Also, can you reuse the same handle repeatedly? for 1..100, get
> this url? Or do you need to init and cleanup every time?
You can reuse the handle. Then curl will reuse the (persistent)
connection.
/Linus
-- Linus Nielsen Feltzing, linus_at_haxx.seReceived on 2002-03-13