CGI SCRIPT..ANTI LEECH...easy one
ok listen here is whut i got....i have 1 antileech that doens't work(all the way) when someone goes to leeched link it displays a html file...well...i got this other antileech that does work...but it displays some corny little msg...so i was gonna have this other one display the html page..seperate page out of script..i tried
Code:
&html("leecher.html");
but that doesn't work..lemme explain farther...
here is the code from the script that doesn't work..
Code:
else {
print "Content-type: text/html\n\n ";
# Log some info about the leecher
$time = localtime();
$referrer = "$ENV{'HTTP_REFERER'}";
$ip = "$ENV{'REMOTE_ADDR'}";
$browser = "$ENV{'HTTP_USER_AGENT'}";
open (FILE,">>$data_path/leechlog.txt") || print "Unable to open leechlog.txt for writing - did you really chmod it 777";
if ($flock eq "y"){flock(FILE,2);}
print FILE "$time;;$referrer;;$ip;;$browser\n";
if ($flock eq "y"){flock(FILE,8);}
close(FILE);
&html("leecher.html");
exit;
ok so then here is the code from the orginal script that displays the corny msg.
Code:
if ($bad_url) {
print "Location: $bad_url\n\n";
exit;
}
print "Content-type: text/html\n\n";
print "<HTML><BODY>\n";
print "<Title>Download.cgi</Title>\n";
if ($ENV{'HTTP_REFERER'}) {
print "<CENTER>Bandwidth thieft isnt nice.</CENTER>\n";
print "<CENTER>$ENV{'HTTP_REFERER'} Has referred you here and shouldnt be linking to this server. To get the requested file visit the link below.</CENTER>\n";
} else {
print "<CENTER>Disable any download managers such as Download Accelerator, Gozilla or GetRight and attempt to download the file again.</CENTER>\n";
}
print "<CENTER><A HREF=\"$homepage\">$homepagename</A></CENTER>\n";
print "</BODY></HTML>\n";
exit;
how can i change it where it goes to the html leecher.htm instead of displaying this? i want it to display the leecher either way..if its getright fault or leecher page..