RE: [PHP] download script

From: Date: Tue, 21 Jan 2003 15:08:44 +0000
Subject: RE: [PHP] download script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-132418@lists.php.net to get a copy of this message
I have never done a script that supports resume but this is the logic you need to follow to work out the protocol behaviour. - Create a download script as per below start downloading then stop the web server. - Change the script to e-mail you the headers from the script request. - Restart the web server and tell Get Right to resume. You should now know what it sends and you simply need to read in the file to that point in the data and start the stream again. I hope this helps. (Trial and Error) Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: tim@hitcho.com.au > -----Original Message----- > From: Martin [mailto:martinacevedo@arnet.com.ar] > Sent: Wednesday, 22 January 2003 12:50 AM > To: php-general@lists.php.net > Subject: [PHP] download script > > > i need a script that make downloads from files but it must > support resuming for getright and download acelerator pro. > Thanks... I have this classic download script , but does not > support resuming > error_reporting(0); > header("Last-Modified: " . gmdate("D, d M Y H:i:s T", > filemtime($filename))); > header("Accept-Ranges: bytes"); > header("Content-Length: " . filesize($filename)); > header("Content-Disposition: attachment; filename=" . > $download); > // header("Content-Type: application/octet-stream"); > readfile($filename); > header("Connection: close"); > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#132418) next »