[Discussion] PHP point download problems

Source: Internet
Author: User
[Discussion] I used PHP to build a site for downloading PHP Credits. The charges for downloading files must be deducted from my account. now I have encountered a problem. After the first download with thunder, the member will send the address in Thunder to others, others can also download it, and paid download will become free. Has anyone ever developed a similar system? is there any good solution ?, The member submits a URL and wants to download it. Thunder puts the URL and USER into the database [discussion] PHP point download question
I used PHP to build a website, and I had to deduct the account fee for downloading files. now I have a problem.
After the first download with thunder, the member will send the address in Thunder to others, others can also download it, and paid download will become free.

Has anyone ever developed a similar system? is there any good solution?

------ Solution --------------------
The member submits a URL and wants to download it. Thunder puts the URL and USER into the database.

When someone else requests the same URL, Thunder finds that the URL has been used by a USER member, so he decides to provide you with download for free and returns the resource immediately.
------ Solution --------------------
Store the database. Check whether the user has downloaded the package.
------ Solution --------------------
You have given the real address to the user, and of course it doesn't matter if the points are downloaded.

You need to always download through php. you can find a solution by searching for php resumable Upload.
------ Solution --------------------
Do not jump to the actual file address. use readfile to output the file content. Note that the relevant header is sent before the output ~

Reference: http://cn2.php.net/readfile
------ Solution --------------------
Discussion

I don't understand what I mean .....

No matter how you verify whether the user has downloaded the file, the actual address of the file has been obtained once.

For example, you can use 127.0.0.1/down. download the php file 127.0.0.1/. the first rarfile can be down. php verification. the verification is successfully redirected to the actual address 127.0.0.1/A.rar to start downloading. at this time, the 127.0.0.1/A.rar address has been exposed, and you can skip down. php ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.