curl-users
Re: How to get file size, in c for any HTTP document?
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 13 May 2004 12:49:16 +0200 (CEST)
Date: Thu, 13 May 2004 12:49:16 +0200 (CEST)
On Wed, 12 May 2004, rohan wrote:
> I have written a c file to browse a list of sites every hour and log the
> time taken to access the sites and the size of the page/image/etc
> downloaded. MY question is how do i get the size of the data downloaded fr
> om the curl functions. Is there any such function?
Check the Content-Length: header, or since you download the data, count the
number of bytes you actually receive.
Uh, and there's a curl-library mailing list that might suit you better since
it deals with libcurl issues.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-05-13