Hello, this is my first time posting here.
What I am trying to do is completely hide the full path of a download file when you highlight the link as well as when the download box comes up. So instead of seeing http://www.domain.com/username/folder/folder/file.zip, show only http://www.domain.com. I have tried using php scripts to do this but I am a noob when it comes to php and I can’t seem to get them to work. Any help would be greatly appreciated. Thanks.
Help with php...How to hide download path with php
Moderator: General Moderators
-
feartetsuo
- Forum Newbie
- Posts: 9
- Joined: Tue Dec 21, 2004 9:25 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
this is generally done by storing your images/downloads outside the root so the users cannot directly download it, and then you can create a function that will manually fetch what you are wanting to display/download
That is obviously simplified, but I hope you get the point.
Code: Select all
<?php
function getfile($file)
{
$dir = 'user/path/images/';
return $dir.$file;
}
?>-
feartetsuo
- Forum Newbie
- Posts: 9
- Joined: Tue Dec 21, 2004 9:25 am