View Full Version : Hide URL
04-13-2004, 02:19 PM
I need to hide the url from which a file is being downloaded, would i do that in a server side scripting language like php? and how would i do it?
04-13-2004, 02:30 PM
Please move this thread the PHP section, thanks :)
okay i found this php code
Copyright (c) 1999 Marcel Lemmen
All rights reserved.
This code provided "As Is" with no warrantees express or implied.
The author and contributors are not liable for anything good or bad
that results from your use of this code.
You are free to distribute this for free provided this notice is included.
Please forward fixes/enhancements to the
author for inclusion in the next revision.
Replace $files with the original with your files.
Replace $filenames with the filename people see when
downloading (CAN be different then file's!!!)
Replace $URL with your directory or the other URL.
Replace $additional_info with the info on each file.
$files=array( 'track01.mp3', 'escreen.exe');
$filenames=array( 'Thank ABBA for the music.mp3', 'Escreen.exe');
$additional_info=array( 'Various artists - Thanx ABBA for the music : 4978602 bytes', 'Shareware program to make a screenshot: 529920 bytes');
/* When the files are on another server, use the
whole address (http://www.server.com/dir/) in stead of /home/lemmen... */
$referer=ereg_replace( "\?.", "",$HTTP_REFERER);
echo "<center><big>Homepage: <a href=\"http://home.support.nl/~lemmen\">http://home.support.nl/~lemmen</big><br><hr><br><br></center>";
echo "<P><A HREF=\"$PHP_SELF?$i\">",$filenames[$i], "</A> $additional_info[$i]\n";
$total=$url . $files[$i];
Header ( "Content-Type: application/octet-stream");
Header ( "Content-Length: ".filesize($total));
Header( "Content-Disposition: attachment; filename=$filenames[$i]");
Is the script safe to use? or is there a more secure script? or is there a safer way to do it? maybe with anouther server side scripting launguage?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.