On Mon, 2006-11-13 at 14:06 +0800, sljm12 wrote:
> Hi all, have 2 questions.
> 
> Some background, I am writing a simple downloader that uses regular 
> expressions to download files from a forum.
> 
> 1. How do i retrieve the file size of the file that i am downloading?
> 

Stephen,

If you want to find out properties of a remote entity (such as its
Content-Length, for instance) without actually retrieving it, you may
want to use HTTP HEAD. Target servers are expected to generate exactly
the same response header to an HTTP HEAD request if though it was a
regular HTTP GET, but they are not supposed not send the response body. 

Hope this helps

Oleg



> 2. The forum uses php, and the link to the files are usually something like 
> "http://www.insertservername.com/attachment.php?123013"; using a web browser 
> for downloads the brower is able to know the resultant file name, how do i do 
> that in HttpClient?
> 
> Pretty new to HttpClient and will appreciate any help.
> 
> Regards
> Stephen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to