Jump to content


Photo

Hide original downloads link through php


  • Please log in to reply
5 replies to this topic

#1 netlovers

netlovers
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 August 2006 - 01:39 PM

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.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 18 August 2006 - 01:49 PM

From the Frequent Q & A here ... http://www.phpfreaks...ic,95433.0.html

That should point the way to do what you want.
Legend has it that reading the manual never killed anyone.
My site

#3 radalin

radalin
  • Members
  • PipPipPip
  • Advanced Member
  • 179 posts

Posted 18 August 2006 - 02:02 PM

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.
Roy Simkes
Yet Another Parkyeri Developer

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 18 August 2006 - 02:31 PM

Using one-time URLs is about as bullet-proof as necessary for this:

http://www.onlamp.co..._time_URLs.html
Legend has it that reading the manual never killed anyone.
My site

#5 netlovers

netlovers
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 August 2006 - 08:06 PM

http://www.phpfreaks...ic,95433.0.html
Above link is not helping me so does anybody has another solution.

#6 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 18 August 2006 - 08:39 PM

Using one-time URLs is about as bullet-proof as necessary for this:

http://www.onlamp.co..._time_URLs.html


That should solve your problem perfectly.
Why doesn't anyone ever say hi, hey, or whad up world?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users