Hey guys, see u are all still kicking around, keeping well I hope.
I have been playing with
1/ .htaccess and
2/ .htaccess/showpic.php
They both work but cant figure out how to make them work as I would like.
the simple .htaccess method described in older posts and below just replaces the hotlinked file with a gif
What I would like to do is have that hotlink pic
(or preferible site link banner )
With a hyper link to kakariki.net home page
And words below like "hotlink bandwidth theft is not permiited, if you wish to visit us clk the banner above" A alt tag with site description
Sort of the same as the code in the link to us block raven has on the home page
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>
<img src="/<?php echo($pic); ?>" alt="Image">
</p>
<p>
Image from
<a href="http://www.kakariki.net">
Only registered users can see links on this board! Get registered or login to the forums!
</p>
</body>
</html>
I have googled for a few days to find something, but the above seems to be they only choices...
I think dong a link banner concept would be a cool idea.
Once again many thanks for the help in the past.
Cheers
Steps
PS was looking for a Simple access log veiwer prog and found this...
Over the last few weeks the guy has upgraded several times with cool added functions..so its work in progress. I have only used thru LAN
Only registered users can see links on this board! Get registered or login to the forums!
// 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>
If I go to
Only registered users can see links on this board! Get registered or login to the forums!
I get what I want to present instead of the hotlinked file
But doesnt work where the hot link is??
I suspect it is the last line in the ,htaccess
Joined: Aug 29, 2004 Posts: 7327 Location: Arizona
Posted:
Tue Jun 10, 2008 5:09 am
Steptoe, bump?
I think you are on the right track. Unfortunately, I am not sure about the second line within your .htaccess. That may very well be correct as far as I know, but my first glance at it made me unsure of it. Maybe try this:
In addition, depending upon where these image path names are coming from, you may want to consider doing some input cleansing on the $pic variable as you could be opening yourself up for all sorts of exploitation.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum