I am making a project for a temporary download link for me to protect the file from hotlinkers…
I believe that this is possible to do so.. because we all know that many of file sharing site “don’t wanna mention any“… their link for the file has expiration…
Ex.
If I download one file from their site they give a direct link to click it right?
but then that link will expire right after a few hours or minutes.
How should I know that the link was expired? If I copy the same link on my download manager after one day, it can’t download the same file.
I already made this possible in htaccess.
Ex.
RewriteRule .*\.(rar|ZIP)$ http://domain.com [R,NC]
if they copy the direct link in the address bar of the browser they will be redirected in http://domain.com
But then if they copy the direct link on their download manager the file will be downloaded.
What if they post the link into any other site like forum website, blog, etc.,
and ask the reader to copy and paste the link into their download manager, so that they can download it directly.
This is the problem I want to prevent to protect my file. I am doing this on PHP but I can’t figure it out…
Your help is very much appreciated.
Use some code like this
add this to your .htaccess file