Protect URL With Script
Posted: Sun Aug 23, 2009 12:28 pm
Hello there,
I am a newbie (dummy) in php programming. Currently, I hosted my website in Cpanel running wordpress with my file system in unix/linux system.
I need to implement a security to protect my url for download so that the download path can change each time and that after my users or customers downloaded the files, they will not be able to pass around the link.
Currently, I have implemented a login page after which users logged in, they will be auto-redirected to a download link. However this is not enough. As I am not an expert in programming, I changed this link frequently so that it will remain protected and only paid subscribers will be able to access for a limited time.
I would like to implement something to automate this - to protect my url. I have read on the internet but still confused on the use of the security like MD5 or SHA.
- Does SHA create a different session key each time the URL is called upon?
- Can base64 achieve this?
I read about mod-rewrite in the unix system but I don't want to touch it and I think it's kind of hard for me. As I don't want to touch on the config or htaccess file because it will become my hosting provider responsibility if anything breaks.
So, here I'd would to inquire if any kind soul or experts would show me some sample script in php or etc... (can run Unix/ Apache server) to implement the above.
Or any technique that can achieve my objective.
e.g my website download link is now http://abc.com/oeurruorwdnndn
Now I would like the oeurruorwdnndn to change each time the browser gets the link.
Thanks Much.
PHP newbie
I am a newbie (dummy) in php programming. Currently, I hosted my website in Cpanel running wordpress with my file system in unix/linux system.
I need to implement a security to protect my url for download so that the download path can change each time and that after my users or customers downloaded the files, they will not be able to pass around the link.
Currently, I have implemented a login page after which users logged in, they will be auto-redirected to a download link. However this is not enough. As I am not an expert in programming, I changed this link frequently so that it will remain protected and only paid subscribers will be able to access for a limited time.
I would like to implement something to automate this - to protect my url. I have read on the internet but still confused on the use of the security like MD5 or SHA.
- Does SHA create a different session key each time the URL is called upon?
- Can base64 achieve this?
I read about mod-rewrite in the unix system but I don't want to touch it and I think it's kind of hard for me. As I don't want to touch on the config or htaccess file because it will become my hosting provider responsibility if anything breaks.
So, here I'd would to inquire if any kind soul or experts would show me some sample script in php or etc... (can run Unix/ Apache server) to implement the above.
Or any technique that can achieve my objective.
e.g my website download link is now http://abc.com/oeurruorwdnndn
Now I would like the oeurruorwdnndn to change each time the browser gets the link.
Thanks Much.
PHP newbie