Code Snippet </> Info
Snippet Name: Anti - Leech 2.0
Description: Allows visitors to only access your web pages through a link and only from your domain. Visitor can not access a page directly through the URL.
Note: Change the domain to yours and paste into all pages needed.
Author: Snap Builder <snippets@snapbuilder.com>
Last Modified: 2019-12-14 01:01:44
Language: php
Highlight Mode: html
|
Copy Codes: Use Free Notepad ++ |
|
Snap HTML Code Editor: Paste the source code, make changes and instantly see it in live preview. Snap HTML Code Editor
|
|
Copied To Clipboard!
<?
// this parse's into the following: $url["scheme"], $url["host"], $url["path"]
$url = parse_url($HTTP_REFERER);
//$url["host"] could be in uppercase so.. new var to lower
$check=strtolower($url["host"]);
// checks proper domain only, no refer needed due to domain check
if ($check!='your-domain-name-here.com')
{
echo "<meta http-equiv="refresh" content="0; url=http://your-domain-name-here.com/warn_page_or_redirect">";
exit;
}
?>
|