User begins to get a file :
1) can get as by one stream so by the unlimited amount of streams
2) User can continue download the file and script gives him a file by bytes ( or kb ), well and able to give pieces ( for streams ) !
it is needed to define is a file got fully ONCE ? after download it to forbid getting of this file another time....
My algorithm: to add up the given amount of information for user from all of streams and write to DB ! In the end to check with files this sum ... well and to draw a conclusion to forbid or not ! Here are a few nuances, how to know user pressed STOP ? Maybe did user come to renew download ? Or anew to rock a file ?