I just ran into this problem. I run a small site dedicated to victoms of Spiritual Abuse and Bible Apologetics. So imagine my surprise this morning when I got submissions from about 10 German Porn Sites !-)
So, after reading all of your messages, I decided to implement the following changes.
First too links.cfg
# Referers -- which hosts are allowed to add to your database.
@db_referers = ('montrosebaptist.org','www.montrosebaptist.org','63.249.233.119');
# 6feb01 -- ban certain referrers
@db_ban = ('net-soft.ne','net-soft.de','195.20.225.110','searchup.de','dj-ufk.de','webnaut.ne','webnaut.de');
Now to add.cgi:
# Check the referer.
# 6feb01
# if (@db_referers and $ENV{'HTTP_REFERER'}) {
if (@db_referers) {
$found = 0;
foreach (@db_referers) {
$ENV{'HTTP_REFERER'} =~ /$_/i and $found++ and last;
}
if (!$found) {
# ----- 6feb01 ------------------
my($warref) = $ENV{'REMOTE_ADDR'};
my($warnung) = qq~<BR><BR><FONT COLOR="RED">Actung ! Nehmen Sie "$in{'Title'}" ($in{'URL'}) unverzüglich von der Liste. Sollten nach einer Reaktionszeit von 2 Tagen immer noch Seitenanmeldungen von <$warref> eintreffen, sind wir gezwungen rechtliche Schritte gegen Sie vorzunehmen.</FONT>~;
if (@db_ban) {
foreach (@db_ban) {
if($ENV{'HTTP_REFERER'} =~ /$_/i || $warref =~ /$_/i ) {
print "Content-type: text/html\n\n<H1>$warnung</H1>";
exit;
}
}
}
# --------------------------------
print "Content-type: text/html\n\n";
print qq~<P>
<H1 align="centered">Auto Submissions are NOT allowed.</H1>
<FONT COLOR="BLUE"><BR>Before you submit your url, please be aware that we are <B>ONLY</B> interested in sites that deal with Spiritual Abuse and Biblical Authority. This is NOT a generic search engine/site. If you are not sure whether or not qualifies, then we suggest you visit the
<A HREF="http://www.montrosebaptist.org">rest of our site <B>(montrosebaptist.org)</B></A> before making an entry.<BR><BR>
Warning! Continued attempts at auto submit $in{'URL'} will compel us to take all legal remedies available to us to make you stop.</FONT>
</P>
<P><FONT COLOR="RED">Wir drucken nicht kommerzielle websites aus. Wir drucken nicht generische Suchmaschinen aus. Kennzeichnen sollen, muß Ihre Site über Mißbrauch des Geistes. Oder Ihre Site muß über die Studie der Bibel sein. Alle weiteren Unterordnungen werden zurückgewiesen.</FONT>
$warnung
</P>
<P><FONT SIZE="-2" COLOR="SILVER">
Your submission from $ENV{'HTTP_REFERER'} ($warref) has been logged for legal/auditing purposes.
</FONT>
</P>
~;
exit;
# &site_html_add_failure ("Auto submission is not allowed in this directory. Please visit the site to add your entry.".$warnung);
# return;
}
}
Yes, it's a bit of a kludge, but it works !
So, after reading all of your messages, I decided to implement the following changes.
First too links.cfg
# Referers -- which hosts are allowed to add to your database.
@db_referers = ('montrosebaptist.org','www.montrosebaptist.org','63.249.233.119');
# 6feb01 -- ban certain referrers
@db_ban = ('net-soft.ne','net-soft.de','195.20.225.110','searchup.de','dj-ufk.de','webnaut.ne','webnaut.de');
Now to add.cgi:
# Check the referer.
# 6feb01
# if (@db_referers and $ENV{'HTTP_REFERER'}) {
if (@db_referers) {
$found = 0;
foreach (@db_referers) {
$ENV{'HTTP_REFERER'} =~ /$_/i and $found++ and last;
}
if (!$found) {
# ----- 6feb01 ------------------
my($warref) = $ENV{'REMOTE_ADDR'};
my($warnung) = qq~<BR><BR><FONT COLOR="RED">Actung ! Nehmen Sie "$in{'Title'}" ($in{'URL'}) unverzüglich von der Liste. Sollten nach einer Reaktionszeit von 2 Tagen immer noch Seitenanmeldungen von <$warref> eintreffen, sind wir gezwungen rechtliche Schritte gegen Sie vorzunehmen.</FONT>~;
if (@db_ban) {
foreach (@db_ban) {
if($ENV{'HTTP_REFERER'} =~ /$_/i || $warref =~ /$_/i ) {
print "Content-type: text/html\n\n<H1>$warnung</H1>";
exit;
}
}
}
# --------------------------------
print "Content-type: text/html\n\n";
print qq~<P>
<H1 align="centered">Auto Submissions are NOT allowed.</H1>
<FONT COLOR="BLUE"><BR>Before you submit your url, please be aware that we are <B>ONLY</B> interested in sites that deal with Spiritual Abuse and Biblical Authority. This is NOT a generic search engine/site. If you are not sure whether or not qualifies, then we suggest you visit the
<A HREF="http://www.montrosebaptist.org">rest of our site <B>(montrosebaptist.org)</B></A> before making an entry.<BR><BR>
Warning! Continued attempts at auto submit $in{'URL'} will compel us to take all legal remedies available to us to make you stop.</FONT>
</P>
<P><FONT COLOR="RED">Wir drucken nicht kommerzielle websites aus. Wir drucken nicht generische Suchmaschinen aus. Kennzeichnen sollen, muß Ihre Site über Mißbrauch des Geistes. Oder Ihre Site muß über die Studie der Bibel sein. Alle weiteren Unterordnungen werden zurückgewiesen.</FONT>
$warnung
</P>
<P><FONT SIZE="-2" COLOR="SILVER">
Your submission from $ENV{'HTTP_REFERER'} ($warref) has been logged for legal/auditing purposes.
</FONT>
</P>
~;
exit;
# &site_html_add_failure ("Auto submission is not allowed in this directory. Please visit the site to add your entry.".$warnung);
# return;
}
}
Yes, it's a bit of a kludge, but it works !