|
Posted by Chung Leong on 10/06/36 11:36
Well, as it's not your own server you can't really modify the binary.
It doesn't sound like you need too accurate a number in any event. I
would just do something like this:
<?
ignore_user_abort(true);
$f = fopen($filename, "rb");
$sent = 0;
while($chunk = fread($f, 1024)) {
echo $chunk;
flush();
if(!connection_aborted()) {
$sent += strlen($chunk);
}
else {
/* record failure here */
break;
}
}
?>
Navigation:
[Reply to this message]
|