Czy ktoś może podać pełen kod pliku blokrob.php ?
Z tych postów to już się połapać nie można...
Heh...
No i rozumiem, że najlepiej blokować wszytskie boty poza:
Googlebot
MSNbot
Yahoo
Onet.pl
?
Serdecznie dziękuję i pozdrawiam.
/edit:
Mój obecny kod wygląda tak:
<?php
$ua = $_SERVER[HTTP_USER_AGENT];
$ip = $_SERVER[REMOTE_ADDR];
function blozakres($zakres,$ip_,$zakresdo=""){
$ip_od = explode(".",$zakres);
$ip_we = explode(".",$ip_);
if (!$zakresdo) {
$zakresdo = $zakres;
}
$ip_do = explode(".",$zakresdo);
for( $x = 0; $x < 4; $x++ ){
$ip_od[$x] = sprintf("%03d",$ip_od[$x]);
$ip_we[$x] = sprintf("%03d",$ip_we[$x]);
if (!$ip_do[$x]) {
$ip_do[$x]=255;
}
$ip_do[$x] = sprintf("%03d",$ip_do[$x]);
}
$zakres = implode("",$ip_od) + 0;
$ip_ = implode("",$ip_we) + 0;
$zakresdo = implode("",$ip_do) + 0;
return (($ip_ >= $zakres) && ($ip_ <= $zakresdo));
}
if ( eregi("Szukacz/1.5 (robot; www.szukacz.pl/jakdzialarobot.html; info@szukacz.pl)", $ua)
|| eregi("LWP::Simple/5.803", $ua)
|| eregi("EmeraldShield.com WebBot (https:// www. emeraldshield.com/webbot.aspx)", $ua)
|| eregi("appie 1.1 (www.walhello.com)", $ua)
|| eregi("https://www.almaden.ibm.com/cs/crawler [fc12]", $ua)
|| eregi("pipeLiner/0.7 (PipeLine Spider; https://www.pipeline-search.com/webmaster.html; webmaster@pipeline-search.com)", $ua)
|| eregi("fukuiben (https://www.ibgakuin.ac.jp/~net/java/tes/fukui1.cgi)", $ua)
|| eregi("sohu-search", $ua)
|| eregi("DELTASCAN", $ua)
|| eregi("ZoomSpider - wrensoft.com", $ua)
|| eregi("SurveyBot/2.3", $ua)
|| eregi("ia_archiver", $ua)
|| eregi("ichiro/1.0 (ichiro@nttr.co.jp)", $ua)
|| eregi("ShowTags/1.0 libwww/5.4.0", $ua)
|| eregi("CydralSpider/1.9 (Cydral Web Image Search; https://www.cydral.com)", $ua)
|| eregi("Holmes/1.0", $ua)
|| eregi("UP.Browser/6.1.0.1.140 (Google CHTML Proxy/1.0)", $ua)
|| eregi("Mozilla/5.0 (compatible; BecomeBot/2.2.1; MSIE 6.0 compatible; +https://www.become.com/webmasters.html) ", $ua)
|| eregi("IRLbot/1.0 (https://irl.cs.tamu.edu/crawler)", $ua)
|| eregi("OmniExplorer_Bot/1.07 (https://www.omni-explorer.com)", $ua)
|| eregi("EasyDL/3.04 (https://keywen.com/Encyclopedia/Bot)", $ua)
|| eregi("WebCopier v3.0", $ua)
|| eregi("NetResearchServer (NRS)", $ua)
|| eregi("LmCrawler", $ua)
|| eregi("Mozilla/4.0 (compatible; MSIE 6.0; Windows XP Professional Bot v.5.)", $ua)
|| eregi("Missigua Locator 1.9", $ua)
|| eregi("TurnitinBot/2.0", $ua)
|| eregi("boitho.com-dc/0.71", $ua)
|| eregi("NMG Spider/0.3 (szukanko.com)", $ua)
|| eregi("NutchCVS/0.06-dev (Nutch; https:// www. nutch. org/docs/en/bot.html; nutch-agent@ lists.sourceforge .net)", $ua)
|| eregi("PlantyNet_WebRobot_V1.9 dhkang@plantynet.com", $ua)
|| eregi("NP/0.1 (NP; https://www.nameprotect.com; npbot@nameprotect.com)", $ua)
|| eregi("Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.dlc@looksmart.net; https://www.WISEnutbot.com)", $ua)
|| eregi("Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.dlc@looksmart.net; ]https://www.WISEnutbot.com)", $ua)
|| eregi("e-SocietyRobot(https://www.yama.info.waseda.ac.jp/~yamana/es/)", $ua)
|| eregi("OmniExplorer_Bot/1.07 (https://www.omni-explorer.com) Internet Categorizer", $ua)
|| eregi("Vagabondo/3.0 (webagent at wise-guys dot nl)", $ua)
|| eregi("Mozilla/4.0 (compatible; Vagabondo/2.3; webcrawler at wise-guys dot nl; https://webagent.wise-guys.nl/)", $ua)
|| eregi("Norbert the Spider(Burf.com)", $ua)
|| eregi("larbin_2.6.3 larbin2.6.3@unspecified.mail", $ua)
|| eregi("ObjectsSearch/0.06", $ua)
|| eregi("Jakarta Commons-HttpClient/2.0M1", $ua)
|| eregi("psbot/0.1 (https://www.picsearch.com/bot.html)", $ua)
|| eregi("krawler/0.1alfa", $ua)
|| eregi("Zongbot /1.0 (https://www.zong.pl/addurl.php)", $ua)
|| eregi("NG/2.0", $ua)
|| eregi("Norbert the Spider(Burf.com)", $ua)
// powielamy eregi
// || blozakres("początek zakresu",&ip,"koniec_zakresu")
|| blozakres("65.19.128.0",$ip,"65.19.191.255")
|| blozakres("64.71.131.96",$ip,"64.71.131.127")
|| $ip == "193.218.115.6"
|| $ip == "70.84.128.244"
|| $ip == "212.14.41.6"
|| $ip == "24.227.118.54"
|| $ip == "80.60.35.143"
|| $ip == "84.104.217.36"
|| $ip == "84.104.217.38"
|| $ip == "24.106.39.250"
|| $ip == "66.147.154.3"
|| $ip == "211.120.209.3"
|| $ip == "220.181.26.69"
|| $ip == "81.190.43.231"
|| $ip == "64.246.161.190"
|| $ip == "209.237.238.179"
|| $ip == "210.173.179.57"
|| $ip == "66.132.157.20"
|| $ip == "80.53.166.202"
|| $ip == "213.246.63.116"
|| $ip == "193.218.115.6"
|| $ip == "4.79.40.166"
|| $ip == "64.233.179.4"
|| $ip == "64.136.59.131"
|| $ip == "213.41.67.34 "
|| $ip == "128.194.135.80"
|| $ip == "64.62.175.138"
|| $ip == "69.31.80.250 "
|| $ip == "65.110.43.50"
|| $ip == "217.160.254.242"
|| $ip == "69.41.173.104"
|| $ip == "220.130.145.70"
|| $ip == "24.177.134.5"
|| $ip == "64.242.88.50"
|| $ip == "133.9.68.243"
|| $ip == "65.19.150.243"
|| $ip == "194.109.125.201"
|| $ip == "85.124.84.211"
|| $ip == "69.150.7.165"
|| $ip == "81.187.167.51"
|| $ip == "217.212.224.143"
|| $ip == "80.51.198.186"
|| $ip == "83.27.130.224"
|| $ip == "84.233.148.20"
|| $ip == "65.19.169.249"
|| $ip == "65.19.150.240"
// omni
|| $ip == "64.71.131.107"
|| $ip == "64.71.131.109"
|| $ip == "64.71.131.110"
|| $ip == "64.71.131.111"
|| $ip == "64.71.131.112"
|| $ip == "64.71.131.113"
|| $ip == "64.71.131.114"
|| $ip == "64.71.131.117"
|| $ip == "64.71.131.119"
|| $ip == "65.19.134.3"
|| $ip == "65.19.134.14"
|| $ip == "65.19.150.14"
|| $ip == "65.19.150.15"
|| $ip == "65.19.150.206"
|| $ip == "65.19.150.207"
|| $ip == "65.19.150.208"
|| $ip == "65.19.150.212"
|| $ip == "65.19.150.215"
|| $ip == "65.19.150.213"
|| $ip == "65.19.150.225"
|| $ip == "65.19.150.226"
|| $ip == "65.19.150.235"
|| $ip == "65.19.150.237"
|| $ip == "65.19.150.236"
|| $ip == "65.19.150.238"
|| $ip == "65.19.150.241"
|| $ip == "65.19.150.240"
|| $ip == "65.19.150.247"
|| $ip == "65.19.150.248"
|| $ip == "65.19.150.251"
|| $ip == "65.19.150.252"
|| $ip == "65.19.150.254"
|| $ip == "65.19.169.242"
|| $ip == "65.19.169.246"
|| $ip == "65.19.169.249"
|| $ip == "65.19.169.253"
|| $ip == "65.19.169.254"
// powielamy IP
)
{
// wysyłamy podejrzanego robota w kosmos np. za pomocą
header("location: https://$ip");
header("Connection: close");
}
?>
Czy to jest prawidłowy skrypt ? I czy blokuje to co trzeba... ?