GeoIP没有显示所有信息

时间:2014-08-25 11:54:59

标签: php

所以我有这个错误,我下载了最新的  geoipcity.inc | geoipregionvars.inc | GeoLiteCity.dat

所以这是我的代码:

<?php
/**
 * Querying against GeoIP/Lite City
 * This will fetch country along with city information
 */

include("geoipcity.inc");
include("geoipregionvars.php");

$giCity = geoip_open("GeoLiteCity.dat",GEOIP_STANDARD);

$ip = "99.99.99.99";
$record = geoip_record_by_addr($giCity, $ip);

echo "Getting Country and City detail by IP Address <br /><br />";

echo "IP: " . $ip . "<br /><br />";

echo "Country Code: " . $record->country_code .  "<br />" .
     "Country Code3: " . $record->country_code . "<br />" .
     "Country Name: " . $record->country_name . "<br />" .
     "Region Code: " . $record->region . "<br />" .
     "City: " . $record->city . "<br />" .
     "Postal Code: " . $record->postal_code . "<br />" .
     "Latitude: " . $record->latitude . "<br />" .
     "Longitude: " . $record->longitude . "<br />" .
     "Metro Code: " . $record->metro_code . "<br />" .
     "Area Code: " . $record->area_code . "<br />" ; 

geoip_close($giCity);

?>

这是我的问题 并非所有结果都显示出来:

  1. 国家代码:SA
  2. 国家代码3:SA
  3. 国家名称:沙特阿拉伯
  4. 区域代码:
  5. 城市:
  6. 邮政编码:
  7. 纬度:25
  8. 经度:45
  9. Metro Code:
  10. 区号:

0 个答案:

没有答案