Jump to content

Archived

This topic is now archived and is closed to further replies.

netlovers

Hide original downloads link through php

Recommended Posts

I want to hide original download link in php
suppose i have 2 files with the following links
http://www.domain.com/file1.zip
and
http://www.domain.com/file2.zip
now i donot want to show these real link to users i want to create a file download.php
when this file calls like this
www.mydomain.com/download.php?id=1 it gives download of  file1.zip whose link mentioned above
and when download.php calls like this
www.mydomain.com/download.php?id=2 it gives download of  file2.zip whose link mentioned above
and so on
So plz help in this matter and tell me which function of php do i need to use in creating this do i need to use mysql.

Share this post


Link to post
Share on other sites
From the Frequent Q & A here ... http://www.phpfreaks.com/forums/index.php/topic,95433.0.html

That should point the way to do what you want.

Share this post


Link to post
Share on other sites
But this will not prevent someone who knows the exact location of your file. If I know that file's location is http://www.domain.com/file1.zip then with writing this link I can download it.

Share this post


Link to post
Share on other sites
Using one-time URLs is about as bullet-proof as necessary for this:

http://www.onlamp.com/pub/a/php/2002/12/05/one_time_URLs.html

Share this post


Link to post
Share on other sites
http://www.phpfreaks.com/forums/index.php/topic,95433.0.html
Above link is not helping me so does anybody has another solution.

Share this post


Link to post
Share on other sites
[quote author=AndyB link=topic=104749.msg417996#msg417996 date=1155911489]
Using one-time URLs is about as bullet-proof as necessary for this:

http://www.onlamp.com/pub/a/php/2002/12/05/one_time_URLs.html
[/quote]

That should solve your problem perfectly.

Share this post


Link to post
Share on other sites

×

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.