download this file: chk-krispnet.php view text/plain: chk-krispnet.php file encoding: UTF-8 [goback]
#!/usr/local/bin/php -q
<?php
## check
##
function check_is_same($ip)
{
list($s,$e,$n,$lname,$isp) = krispnet::search($ip);
list($s1,$e1,$n1,$lname1,$isp1) = krispnet::search($s);
if($s!=$s1 || $e!=$e1) echo "$ip | $s $e $n | $s1 $e1 $n1\n";
}
set_time_limit(0);
ini_set('memory_limit','16M'); // it's maximum file size by fopen()
require_once 'class.krispnet.php';
$f = file('country-ISP-KR.txt');
$size = sizeof($f);
for($i=0; $i<$size; $i++)
{
list($start,$end,$kr,$name) = preg_split('/\s+/',trim($f[$i]));
check_is_same($start);
check_is_same($end);
}
exit;
?>