A while back I put my picture on hotornot.com and decided to host it myself. For those of you who don't know, hotornot.com doesn't allow any contact information in your profile. To enforce that, they have a group of human moderators that go and check out users' profiles before anyone else can see them.
One day, I was watching my web logs (like every other day) and I noticed that the hotornot moderators were all comming from mod.hotornot.com. That is that mod.hotornot.com was the referring URL. Everyone else was comming from www.hotornot.com. With this in mind, I devised a way to include my contact information by serving different images based on the referring URL.
HA HA HA!!! It worked.
Below is the source.
UPDATE 8-30-2002:
I wrote this script for my own use. I didn't even consider that other people would want to use it. I just want to let people know that if you use this script, 1) I am not responsible 2) I'd appreciate it if you email me a link to your hotornot.com profile.
#!/usr/bin/perl
#
# Switch pictures for hotornot.com moderators.
# Joe Bath 1.09.02
#
print "Content-type: image/jpeg\n\n";
$refer = $ENV{'HTTP_REFERER'};
if ($refer eq "http://mod.hotornot.com/") {
$image = "/home/joe/http/htdocs/pics/hotornot_normal.jpg";
} else {
$image = "/home/joe/http/htdocs/pics/hotornot_email.jpg";
}
open IMAGE, $image or die;
while (<IMAGE>) { print }
close IMAGE;