Am I wrong in thinking that if you output the whole file that would be
close enough to equal a complete download?
There is no way to know if the file downloaded completely that I am
aware of. You can only assume that if you have sent the whole file
then the hwole file has been downloaded.
If that is enough, then I think you just update some status after the
file output.
// set some download headers
readfile($path_to_file);
// update download status
But, I am not entirely sure that the execution is halted if the
connection to the client is lost.
You may have to do someting like:
$num_bytes = readfile($path_to_file);
if ( $num_bytes == filesize($path_to_file) ) {
// update download status
}
On Oct 13, 9:46 am, Rahman Mousavian <[EMAIL PROTECTED]> wrote:
> Hi all
> I want to write an script that for example if a user attempt to
> download a file
> the system allow them, but when they download completely (just
> completely) that file, sth happen!
> for example a value on db increase !
>
> Any One knows ?
> Thanks before
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---