#!/usr/local/bin/perl
# prints a little message about what  a bad referer you've been.

$| = 1;
use CGI;
$q = new CGI;
$q->import_names;
print $q->header;

$refresh = '<META HTTP-EQUIV="REFRESH" CONTENT="15; URL=http://detritus.net">';

open(HEADER, "/www/Detritus/includes/header.html");
$header = join '', <HEADER>;
$header =~ s/<body/$refresh<body/i;
print $header;
close HEADER;

$referer = $ENV{'HTTP_REFERER'};
$referer = "But you were coming from <a href=\"$referer\">$referer</a>." if $referer;

print <<"EOT";
<center>
<font size=+2><b>
Sorry, you're not allowed in here without a chaperone.
</font></b>
</center><p>
Apparently you were trying to get this file:
<b>$Q::request</b>
<p>

$referer

<p>

We don't allow access to that file  unless you get there from a link on 
<a href="http://www.detritus.net">Detritus.net</a> or <a href="http://$Q::host">$Q::host</a>, or another Detritus-hosted site.  You see, there's some <b>MPG3 d00dz</b> that crawl the web with their little web robots, just collecting links to kewl mp3 files.

<b>Well, the mp3 files here are special.</b>  
<p>We don't mind you listening to them.
But we want to explain to you what they are exactly, cuz these cheesy mpeg sites don't have their shit together, man.  They don't know the story behind these important works of audio art.  

<p>


So, please go to the <a href="http://www.detritus.net">Detritus Front Door</a>, or the front door of $Q::host.
<p>

<font size=-1>
(If you reached this message via the front door, you are probably accessing the Web through a <b>proxy server</b> and/or a <b>firewall</b>.  AOL is an example of an ISP that uses proxies.  We suggest trying a different internet service provider.  Or: just recently, we've added cookie-tracking to our archive.  If you're having trouble, try setting your browser to <b>accept</b> cookies.)
</font>
<p>
<a href="/archive/mp3_background.txt">more background info</a>rmation on the problem that's caused us to do this.

<p>
Thanx, and enjoy your stay!
<p>
<hr>
<center>
<font size=-1>
N&copy; Detritus.net.  Sharerights extended to all.
</font>
<br>
</body>
</html>
EOT





