|
|
|
| Title : |
ANTI leech script, use this if you want that people can't
see the original URL. The files can be on your own server
or on another server. |
| Categories : |
HTML, Misc, PHP |
 Marcel Lemmen |
| Date : |
May 11th 1999 |
| Grade : |
1 of 5 (graded 2 times) |
| Viewed : |
9337 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Marcel Lemmen |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
<?
/*
Copyright (c) 1999 Marcel Lemmen
E-mail: lemmen@support.nl
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.
Usage:
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.
That's all!!!
*/
$files=array('file1.zip','file2.zip');
$filenames=array('File1.zip','File2.zip');
$url="/home/lemmen/public_html/data/";
/* 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);
$thisfile="http://$HTTP_HOST$PHP_SELF";
if ($referer!=$thisfile)
for ($i=0;$i<count($files);$i++)
echo "<P><A HREF=\"$PHP_SELF?$i\">",$filenames[$i],"</A>\n";
else {
$i=$QUERY_STRING;
$total=$url . $files[$i];
Header ("Content-Type: application/octet-stream");
Header ("Content-Length: ".filesize($total));
Header("Content-Disposition: attachment; filename=$filenames[$i]");
readfile($total);
}
?> |
| Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | This script shows you the 7th latest php items from the mailing list archive on zend.com Categories : HTML, HTML and PHP, HTTP, PHP | | | Formit 1.0. PHP Very easy to implement form-template(s) to email script.
Works with multiple templates and HTML-format email. Only one file! Categories : PHP, Email, HTML | |
| | Take multiple text files and do simple formatting on them and add them to a webpage Categories : HTML, Filesystem, PHP | | | Snipe.Net's Web Design Color Scheme Previewer- Allows uses to input hex
codes for their text, background, and link colors, and preview the color
scheme with their background image. Example:
http://www.snipe.net/tech/snipeschool/hex.php3 Categories : PHP, HTML and PHP, General, Graphics, HTML | | | webcam cam view image ispy browser independant Categories : Graphics, HTML, HTML and PHP, PHP | | | The first step Guest Book ... ^^ Categories : MySQL, PHP, Apache, HTML, HTTP | | | A widget for presenting color options in a drop down menu Categories : HTML, PHP | | | PHP Composer - This class is meant to render images of the musical score of ring tones notes used in cellular phones, defined in the RTTL format.
Categories : PHP, PHP Classes, Misc | | | ASCII To HTML Converter Categories : PHP, HTML, ASCII | | | Parses HTTP_USER_AGENT so that you can customize your site to different browsers Categories : HTML, PHP, Complete Programs | | | This is a simple PHP3 script to send an instant msg to the webmaster (only for Windows NT). Categories : PHP, Misc, Miscellaneous | | | Builds JavaScript that updates the contents of one selector based on another. Categories : HTML, Java Script, PHP, Complete Programs, General | | | Newbie Notes #10 - Generating drop downs Categories : PHP, MySQL, HTML, Beginner Guides, Databases | |
|
|