K|NG Posted April 22, 2003 Report Share Posted April 22, 2003 Meklēju botu izfiltrēšanas skriptu iekš php tipa kaut kā šitā: <code><font color="#000000"> <font color="#0000CC"><?php </font><font color="#006600">if(</font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">"HTTP_CLIENT_IP"</font><font color="#006600">)) { </font><font color="#0000CC">$ip </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">"HTTP_CLIENT_IP"</font><font color="#006600">); }elseif(</font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">"HTTP_X_FORWARDED_FOR"</font><font color="#006600">)) { </font><font color="#0000CC">$ip </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">"HTTP_X_FORWARDED_FOR"</font><font color="#006600">); }else{ </font><font color="#0000CC">$ip </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">"REMOTE_ADDR"</font><font color="#006600">); } if (</font><font color="#0000CC">eregi </font><font color="#006600">(</font><font color="#CC0000">"searchbotaip"</font><font color="#006600">, </font><font color="#0000CC">$REMOTE_ADDR</font><font color="#006600">)==</font><font color="#0000CC">true</font><font color="#006600">) </font><font color="#0000CC">$ip</font><font color="#006600">=</font><font color="#CC0000">"nevajadzigs"</font><font color="#006600">; ... </font><font color="#0000CC">?></font> </font> </code> Kā lai to dabūn gatavu? Link to comment Share on other sites More sharing options...
Recommended Posts