<?php
## Functions ##
function getIP($line) {
ereg("[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}",$line,$regMatch);
*
*
*
if($ip) return $ip; else return "false";
}
function processString($string, $size = 18) {
$string = "[ ".$string;
*ژ*
for($x = 0; $x < $toAdd; $x++) {
$string = $string." ";
}
*
*
*
*
## Code ##
while (true) {
$cmd = "netstat -n | awk '{ print $5 }'";
*
*
*
*
*
*
*
{
$ipArray[$ip]+=1;
}
else // if not, count=1
{
$ipArray[$ip] = 1;
}
}
}
asort($ipArray);
system("clear");
*
*
*
*
*
*
echo "\tTimes Accessed: " .$count ."\n";
}
echo str_repeat("-", 50) ."\n";
*
*
*
*
*
echo 'Showing $count >= 15: (Escape with ctrl+c)' ."\n";
sleep(10);
}
?>