HTTP
|
|
|
|
<?
/* Anti-leech bandwidth protecter by Corey Milner, http://www.odey.com.
Turn the refererring URL into a variable */
$from = getenv("HTTP_REFERER");
/* Check to see if the URL in the variable is a valid referrer. Add the page URL which you would like people to arrive from here. */
if ($from != "http://www.yoursite.com/validpage.htm")
/* If the URL is valid, page loads now */
/* If URL is invalid the following error message and proper link appears, enter your custom error message and a hyperlink to the valid URL you entered above here*/
{print(" Sorry you have tried to link to a page which does not accept visitors directly. <br>
<a href=http://www.yoursite.com/validpage.htm>CLICK HERE</a> to enter");
/* Prevent the rest of the page from loading */ exit;}
?>
|
|
|
Usage Example
|
|
|
Rate This Script
|
|
|
|