1. 首页
  2. 编程语言
  3. C
  4. GeoIP C API (Linux下使用)

GeoIP C API (Linux下使用)

上传者: 2019-04-01 05:16:12上传 GZ文件 963.71KB 热度 46次
This API should work on most UNIX and GNU/Linux platforms and is thread-safe. ./configure make make check make install For installing on Windows, see the READMEwin32.txt file supplied with the distribution. Usage This following sample code looks up the country code by IP address: #include int main (int argc, char *argv[]) { GeoIP * gi; gi = GeoIP_new(GEOIP_STANDARD); printf("code %s\n", GeoIP_country_code_by_name(gi, "yahoo.com")); } To compile this example, run gcc -lGeoIP example.c. *argv[]) { GeoIP * gi; gi = GeoIP_new(GEOIP_STANDARD); printf("code %s\n", GeoIP_country_code_by_name(gi, "yahoo.com")); } To compile this example, run gcc -lGeoIP example.c.
用户评论
码姐姐匿名网友 2019-04-01 05:16:12

不错,可编译通过。

码姐姐匿名网友 2019-04-01 05:16:12

感觉还可以,在google找到一模一样的了

码姐姐匿名网友 2019-04-01 05:16:12

很有用的资源

码姐姐匿名网友 2019-04-01 05:16:12

很有用,不错的资源~