sub checkbannedcountry } (@ipaddress) = split /\./, $ENV{'REMOTE_ADDR'}; $ipaddressnumber = $ipaddress[0] * 16777216 + $ipaddress[1] * 65536 + $ipaddress[2] * 256 + $ipaddress[3]; open IPDATA, "../psmembers/ipdata.txt"; while () { (@element) = split /\|/; if ($element[0] > $ipaddressnumber) {last} # we've gone past the value if ($element[1] < $ipaddressnumber) {next} chomp $element[2]; $ipcountry = lc($element[2]); } close IPDATA; return unless ($service =~ /^(femf|shew|comfs|comaf|combf|comhf|comhhf)$/) and ($ipcountry =~ /^(ar|bo|br|cl|co|ec|gf|gy|pa|py|pe|sr|uy|ve)$/); $suspectcode = 'block'; $suspectreason = "Country $service and $ipcountry; &header2; print "

Welcome to the web site

\n"; &Fileripoff(); &PrintRipoff(); exit(0) }