
08.05.2009, 02:06
|
|
Флудер
Регистрация: 20.11.2006
Сообщений: 3,315
С нами:
10248806
Репутация:
2371
|
|
PHP код:
<?php
$log = 'ip.txt';
$file = file($log);
$k = array();
foreach($file as $abc)
{
list($k['ip'][], $k['time'][], $k['cid'][], $k['nat'][]) = explode(':::', trim($abc));
}
$max_time = time() - 300000;
/*$k['ip'] = array_unique($k['ip']);
$k['time'] = array_unique($k['time']);
$k['cid'] = array_unique($k['cid']);
$k['nat'] = array_unique($k['nat']);*/
$count = count($k['ip']);
for($i = 0;$i < $count; $i++)
{
if($k['time'][$i] > $max_time)
{
$vremya = date('h:i:s', $k['time'][$i]);
if(strpos($k['nat'][$i], 'real') !== false)
{
$color='#66DD66';
}
else
{
$color='yellow';
}
echo '<a href="javascript:FP_setTextFieldText(\'ipaddr\', \''.$k['ip'][$i].'\', \'1\')"><font color='.$color.' size=2>'.$k['cid'][$i].'</font></a><font color=red size=2> Time:'.$vremya.'</font><br/>';
}
}
?>
|
|
|