I was looking for something fairly targeted for hotlink redirection and didn't find anything posted here suitable, so I'm sharing my solution - it's not ideal - if there is an update to vbulletin I'll need to re-apply my changes, but for my purposes it worked.
I found an image hotlinked to my site from a cricket enthusiast site - the image was this:
It was some Indian cricket nut trying to diss the Aussies in a post about cricket after a win by India over Australia, so I specifically targeted referrers from that site to display this image instead:
How I ended up doing it was hacky, but it works... in attachment.php, I just added these lines of code:
Code:
if( stripos($_SERVER['HTTP_REFERER'], 'cricketweb.net') !== FALSE ) {
header('Content-Type: image/jpeg');
readfile('images/numberone.jpg');
exit;
}
Simple, silly and pointless, but I had fun
URL of the post hotlinking is
here - but no doubt the poster will edit their post when they learn of my tricksies, so it may not last long.