Jump to content
Larry Ullman's Book Forums

Restrict Downloading Files On Remote Server


Recommended Posts

I read in the blog that this site uses Amazon Cloudfront. I am also interested in using something similar.

 

Q. 1: My site detects when a payment has finished, and I want only the people who paid to be able to download a file on a remote server (Such as Amazon). Is this possible? (I don't want to use a link that someone can give his friends to download the purchases too.)

 

I understand that I cannot use PHP's fopen() functions, because this will end up using both Server A and server B's bandwidth resources! The whole point of me putting the files on a remote server is to reduce bandwidth usage on my main server.

 

Q. 2: If this is not possible, the only other method I can think of is to keep the files on the same server with the payment validation, and put the files in my unreadable folder (outside of the public web root). Then, I would use readfile() to let the people who purchased access those files. Is this a good method?

 

Thank you for helping. (if you need more information, let me know)

Link to comment
Share on other sites

Q. 1: My site detects when a payment has finished, and I want only the people who paid to be able to download a file on a remote server (Such as Amazon). Is this possible? (I don't want to use a link that someone can give his friends to download the purchases too.)

 

It may be possible to use Cloudfront for this purpose, but off the top of my head, I wouldn't know how. It sounds like you just ought to use a payment service like PayPal that can also handle the providing of the digital content.

 

Q. 2: If this is not possible, the only other method I can think of is to keep the files on the same server with the payment validation, and put the files in my unreadable folder (outside of the public web root). Then, I would use readfile() to let the people who purchased access those files. Is this a good method?

 

That's absolutely a good method.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...