Jump to content

help for php download system. how can i make it?


novarahman001
Go to solution Solved by QuickOldCar,

Recommended Posts

  • Solution

I see filehorse generating a link to a direct download with no expire.

http://www.filehorse.com/download-avast-antivirus/download/

 

There are other sites that do that though, basically setting a token in a url that can be used once or expire in a certain amount of time.

http://en.wikipedia.org/wiki/Tokenization_%28data_security%29

 

Sometimes their links are just their own custom versions of the hashed file locations or is an associated random token.

The download locations and hash values could be saved in a database.

Other methods such as sessions or cookies can be used as well with expires.

 

When a user clicks the link they are directed to a script which uses the hash or by using the token id will know the files location.

As well as the hash can also add timestamps for expiration times.

Link to comment
Share on other sites

Can use mod_auth_token apache module

https://code.google.com/p/mod-auth-token/

 

This is very old, but has what you are looking for.

For your own good don't just use this exact code and run it.

Use it as a guide of how to go about it.

http://ardamis.com/2008/06/11/protecting-a-download-using-a-unique-url/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.