|
|
|
| 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 : |
2 of 5 (graded 4 times) |
| Viewed : |
14205 |
| 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 is a simple PHP3 script to send an instant msg to the webmaster (only for Windows NT). Categories : PHP, Misc, Miscellaneous | | | Popup Menu 0.5, popup, select, html, state-maintaing Categories : HTML, PHP, HTML and PHP | | | Newbie Notes #10 - Generating drop downs Categories : PHP, MySQL, HTML, Beginner Guides, Databases | | | FormWizard reads a mysql table and generates automatically
a html formular in a html-table Categories : PHP, MySQL, HTML | | | phpRecommend v1.2 - UPDATED - recommend this page to a friend
script - VERY easy install - now with data logging to text file Categories : Complete Programs, PHP, Link to Article, URLs, Misc | | | How to get the source of a site into an array. Categories : Arrays, HTML, PHP | | | How to know which input button of type image was pressed in a form with
multiple image buttons (_x and _y) in PHP? Categories : PHP, Variables, HTML | | | Display Slashdot headers on your own site Categories : HTML and PHP, HTML, PHP | | | Form is a utility class for generating html forms. It provides form initialization and regex based data validation (both server and client side) with a convenient interface. This version obsoletes version 1.0a Categories : HTML, PHP, PHP Classes, Regexps | | | How to preset a text string in a textarea input field Categories : HTML, HTML and PHP, PHP, Beginner Guides | | | How to use regular expressions to get the list of links from an HTML page Categories : PHP, Regexps, HTML, HTML and PHP | | | This script allows people to add their favorite quotes to your website. This
could easily be modified to be a guestbook script or comment page script. Categories : PHP, Complete Programs, HTML and PHP, Misc | | | BBCode Formatting String Categories : PHP, HTML, Regexps, Arrays | | | Browser Detecor Class Categories : PHP Classes, PHP, HTML | |
| |
| |
|