"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message news:<bn**********@nic.grnet.gr>...
I want send my zip files in my page from inside php.
With this I know how many people have download my file and other information.
My problem is this, I have this code but it dosn't resume broken downloads.
What I can do for this?
-------------------
<?php
header('Content-type: application/zip');
$fp = fopen('file.zip', 'rb');
while (!feof($fp))
echo fread($fp, 1024);
fclose($fp);
?>
---------------------
This won't work for resume download. You need to parse the
request header of the download manager (HTTP_RANGE) and echo only that
range using fseek or something. Also you need to send the proper
header
(ie, something like header('Content-Range: bytes 0-200/1024'))
You may even get nice PHP script by Googling.
---
"US got a nuclear bomb that can destroy the world 13 times. Russia
got a nuclear bomb that can destroy the world 7 times. But...my
friend! Tell me! CAN YOU KILL A MAN TWICE??!!!!!" -- P.A.Sangma, Peace
loving Indian politician against India's step to go for a nuclear
test.
Email: rrjanbiah-at-Y!com