My coding is sort of try.. hit and miss ..google a lot and after a week or so start to ask, after seaching forums etc
I have got this far with basic htaccess code
- Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?kakariki.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?kakariki.sytes.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?babelfish.altavista.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?translate.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?msn.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?msn.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?windowslivetranslator.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.kakariki.net/hotlink.jpg [NC]
Which gives this web page hotlink
http://www.theparrotsocietyuk.org/foRum ... f=10&t=689
What I would like is this
http://www.kakariki.net/showpic.php
So messed around with creating a showpic.php code
- Code: Select all
<?php
header("Content-type: text/html");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache,
must-revalidate");
header("Cache-Control: post-check=0, pre-check=0",
false);
header("Pragma: no-cache");
// $pic = strip_tags( $_GET['pic'] );
// if ( ! $pic ) {
// die("No picture specified.");
// }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><?php echo($pic); ?></title>
<meta
http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"
>
</head>
<body>
<p>
<a href="http://www.kakariki.net"><strong><big></big></strong><b>Due to Hotlinking Abuse the Practice is Blocked</b><br>
<img src=/kikelogosm.gif alt="Kakariki, Care, Breeding, Diet, Health, Aviaries and Conservation" width=315 height=61><br>
<strong><big></big></strong><b>You May Like to click Our Banner to Visit Us</b></a><br>
Admin: Kakariki.net
</p>
</body>
</html>
And this in .htaccess
- Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$.*gif$.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !kakariki\.net [NC]
RewriteCond %{HTTP_REFERER} !kakariki\.sytes\.net [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /showpic.php?pic=$1
RewriteRule (.*) /showpic.php$1
I have also played with the following in .htaccess
- Code: Select all
href="http://www.kakariki.net"><strong><big></big></strong><b>Due to Hotlinking Abuse the Practice is Blocked</b><br>
<img src=/kikelogosm.gif alt="Kakariki, Care, Breeding, Diet, Health, Aviaries and Conservation" width=315 height=61><br>
<strong><big></big></strong><b>You May Like to click Our Banner to Visit Us</b></a><br>
Admin: Kakariki.net
Basically I dont even know if it is possible to do or even if Im anywhere the right track...
I have hit a brick wall
I do know, the concept is no where to be found in google, and think it is right or wrong, quite cool and others may also like it
help appreciated
Cheers
Steps.