Url hide


hi is there a program or how i change the file URL. Example i have the file. www.domain222.net/file.exe, i want to change it to www.domain.com/asdfhkwefhskdf.exe or something


you can parse the file through a php script, or even use mod_rewrite or both

so the php script could be something like www.domain2.net/download.php?binary=file.exe

even though this shows the actual file name, it does not show where the file is located, for all we know it could be in /home/domain222.net/private/

and usign the php script you can allow/deny access to certain users.


where can i get those script. any link or tutor u can give me thank.


can u guys give me an example script, like what program i need to get to do that.


go here…

<?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="downloaded.pdf"'); // The PDF source is in original.pdf readfile('original.pdf'); ?>

this will read a file called original.pdf and parse it back to the user as a file called downloaded.pdf, just make sure to adjust the mime type accordingly…

also be very sure that the users do not somehow manage to hack your php script, otherwise you will leave you entire webserver open to anyone as this script can parse through almost any files you have permissions to

dont do this:
because what if the user decides to do this:
…you get the point

what you could do is this:

case “video1” $fileName = “video1.avi”; break;
case “video2” $fileName = “video2.avi”; break;
case “video3” $fileName = “video3.avi”; break;
case “video4” $fileName = “video4.avi”; break;
default: echo “error”; exit(); break;

or you could use regular expressions to make sure the file is in the correct folder