#!/usr/bin/php -q
<?php

include ("NetAcuity.inc");

$na = new NetAcuity;
$na->set_server_addr ('localhost');
$na->set_id (99);
$na->set_timeout (1);


$old_errh = set_error_handler ('silent');
$addresses = array ('216.77.240.246', '199.72.1.1', '62.119.66.68', '62.210.155.17', '212.161.99.160', '152.2.1.217');
foreach ($addresses as $addr) {
    $na->na_query_geo($addr);
    $cc     = $na->get_country();
    $region = $na->get_region();
    $mc     = $na->get_metro_code();
    $city   = $na->get_city();
    print "$addr: $cc:$region:$mc:$city\n";
}

?>

