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: [EMAIL PROTECTED]

> -----Original Message-----
> From: Martin [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, 22 January 2003 12:50 AM
> To: [EMAIL PROTECTED]
> 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
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to