V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
meteor2013
V2EX  ›  PHP

请问有什么好点的办法用 PHP 把 IP 转成地区或者城市呢?

  •  
  •   meteor2013 · 2020-05-21 09:50:44 +08:00 · 3076 次点击
    这是一个创建于 1428 天前的主题,其中的信息可能已经有所发展或是发生改变。
    8 条回复    2020-05-21 16:53:02 +08:00
    villivateur
        1
    villivateur  
       2020-05-21 10:01:40 +08:00
    ipip.net 要 API
    Chappako
        2
    Chappako  
       2020-05-21 10:03:33 +08:00   ❤️ 1
    google php ip to city 搜不到有用的信息?
    jellybool
        3
    jellybool  
       2020-05-21 10:03:44 +08:00 via Android   ❤️ 1
    ip.sb 的服务基本足够了,这应该是 v 站某个大佬的服务。
    wh1012023498
        4
    wh1012023498  
       2020-05-21 10:04:10 +08:00
    TeslaLyon
        5
    TeslaLyon  
       2020-05-21 10:14:07 +08:00 via iPhone
    有个 ip 的 composer 包,可以去 github 搜一下
    dorothyREN
        6
    dorothyREN  
       2020-05-21 10:26:44 +08:00
    用纯真数据库就行
    jhhhh
        7
    jhhhh  
       2020-05-21 14:17:19 +08:00
    cip.cc 也行
    cbasil
        8
    cbasil  
       2020-05-21 16:53:02 +08:00
    百度 高德地图都有 ip 定位的接口,免费开放的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3208 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:06 · PVG 21:06 · LAX 06:06 · JFK 09:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.