Get country location of an IP with native PHP

前端 未结 8 1058
野性不改
野性不改 2020-12-23 16:46

Read on before you say this is a duplicate, it\'s not. (as far as I could see)

I want to get the county code in php from the client.

Yes I know you can do th

8条回答
  •  离开以前
    2020-12-23 17:02

    Here is a site with a script i just used. The only problem is that you would probably every now and then need to regenerate IPs by yourself... which might be pain and tahts why everyone is telling you to use external API. But for me that wasnt solution as i was pulling like 50 IPs at once, which means i would probably get banned. So solution was to use my own script or to do saves to DB, but i was again pulling images from external sites. Anyway here is the site i found script on:

    http://coding-talk.com/f29/country-flag-script-8882/

提交回复
热议问题