-

. !

 -

 -

NikitA -
: 346 (10)
, .
: 125 (1)
?
: 239 (24)
: 78 (2)
, 6
: 604 (2)

 -

 -

[]
: 27 : 0
: 1559 : 2

 - e-mail

 

 -

 LiveInternet.ru:
: 22.02.2007
: 3018
: 11954
: 26601

:


, , -

, 06 2007 . 20:33 +

, , , , , .

. , User Agent , . , , , , , .

. , , . , :

CREATE TABLE `bot_ips` (
`id` int(11) NOT NULL auto_increment,
`ip` varchar(25) NOT NULL,
`bot` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ipi` (`ip`)
) ENGINE=MyISAM

- . : http://www.iplists.com/nw/.

:

mysql_connect("localhost","root","root");
mysql_select_db("mydatabase");
$strs = file('http://www.iplists.com/nw/google.txt');
for($i = 0; $i < count($strs); $i++ )
{
if( $strs[$i][0] == '#' )
continue;
$str = trim($strs[$i],"\r\n ");

mysql_query("INSERT IGNORE INTO bot_ips SET ip = '".mysql_real_escape_string($str)."', bot = 'google'");
}

$strs = file('http://www.iplists.com/nw/inktomi.txt');

for($i = 0; $i< count($strs); $i++ )
{
if( $strs[$i][0] == '#' )
continue;
$str = trim($strs[$i],"\r\n ");

mysql_query("INSERT IGNORE INTO bot_ips SET ip = '".mysql_real_escape_string($str)."', bot = 'yahoo'");
}

$strs = file('http://www.iplists.com/nw/msn.txt');

for($i = 0; $i< count($strs); $i++ )
{
if( $strs[$i][0] == '#' )
continue;
$str = trim($strs[$i],"\r\n ");

mysql_query("INSERT IGNORE INTO bot_ips SET ip = '".mysql_real_escape_string($str)."', bot = 'msn'");
}

$strs = file('http://www.iplists.com/nw/altavista.txt');

for($i = 0; $i< count($strs); $i++ )
{
if( $strs[$i][0] == '#' )
continue;
$str = trim($strs[$i],"\r\n ");

mysql_query("INSERT IGNORE INTO bot_ips SET ip = '".mysql_real_escape_string($str)."', bot = 'altavista'");
}

, . - .

, .

:

function userIsBot()
{
if( empty($_SERVER['REMOTE_ADDR']) )
return false;

$res = mysql_query("SELECT bot FROM bot_ips WHERE '".$_SERVER['REMOTE_ADDR']."' LIKE CONCAT(ip,'%') LIMIT 0,1");
$row = mysql_fetch_assoc($res);

if( empty($row) )
return false;

return $row['bot'];
}

, .

- . ( robots.txt, ). , .

~ ~
:  

: [1] []
??????   , 06 2007 . 21:24 ()
, . .
?
,
1000 .
" "
   
Humiliating   , 06 2007 . 22:28 ()
antiyandex, EXPLOIT.IN , - - . , , - .
.
, :)
   
??????   , 06 2007 . 22:58 ()
- .
   
Humiliating   , 06 2007 . 23:15 ()
antiyandex, freesoft@hroft.ru - :)
   
: [1] []
 

:
: 

: ( )

:

  URL