curl-library
Re: Capture the result of FTP command
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 5 Nov 2008 22:43:47 -0800
Date: Wed, 5 Nov 2008 22:43:47 -0800
On Thu, Nov 06, 2008 at 05:17:33PM +1100, Sundar, Karthik wrote:
> I am getting the output printed as
>
> > SIZE bd
>
> < 213 1501184
>
>
> Please let me know how to get the size ?1501184? in a variable.
You could install a header callback function which ought to give you that
data. But since libcurl already calls SIZE, just do a CURLOPT_NOBODY request
and extract the size using the curl_easy_getinfo
CURLINFO_CONTENT_LENGTH_DOWNLOAD parameter.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-11-06