I’m writing a PHP script that allows the user to download a file. Basically the idea is to prevent the file being downloaded more than X times, since it is paid content, and the link should not be spread around. Since the files will be pretty large, it should be good to implement resuming. I’ve re…