Re: Get file download time.

From: Date: Thu, 07 Feb 2002 05:58:10 +0000
Subject: Re: Get file download time.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83813@lists.php.net to get a copy of this message
On Thursday 07 February 2002 13:19, J.F.Kishor wrote: > Hi all, > > Is there any way to get file download time, using php functions?, > if not, could any one help to get it done. If you mean "how long it had taken for someone to download a file from your site" then yes. You need to handle file download links yourself. Thus all your download links would have to be of the form: http://www.domain.com/download.php?file=somefile Then your download.php would be in psuedo-code: <? retrieve filename from URL; look up file details (size) in filesystem; start a timer; output the appropriate HTTP headers; read and output the contents of file; stop timer; calculate elapsed time; ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* "I'd love to go out with you, but I've been scheduled for a karma transplant." */

« previous php.general (#83813) next »