';
echo 'testing geoip PHP functions:
';
echo '';
foreach ($functions as $f) {
echo sprintf('- %s: %s available
',
$f, function_exists($f) ? 'is' : 'is not');
}
echo '- DB version: ', geoip_database_info(), '
';
echo '
';
echo 'using geoip PHP module
';
foreach ($ips as $label => $ip) {
echo ' * ', $label, ': ', $ip, ' => ';
echo geoip_country_code_by_name($ip), ', ';
echo geoip_continent_code_by_name($ip), ', ';
echo geoip_record_by_name($ip), ', ';
echo geoip_id_by_name($ip), ', '; // GEOIP_UNKNOWN_SPEED GEOIP_DIALUP_SPEED GEOIP_CABLEDSL_SPEED GEOIP_CORPORATE_SPEED
echo geoip_isp_by_name($ip), ', ';
echo geoip_org_by_name($ip), ', ';
echo implode(', ', geoip_record_by_name($ip));
echo "\n";
}
echo 'using mod_geoip
';
echo 'Country: ', apache_note("GEOIP_COUNTRY_CODE"), '
';
echo 'Country name: ', apache_note("GEOIP_COUNTRY_NAME"), '
';
echo '----