4 ms·
I'm baffled why anyone would use this, when you can import data in a database and run it on your own server? I mean, you might spend 20 minutes more to set it
by babuskov 9y ago
I'm baffled why anyone would use this, when you can import data in a database and run it on your own server?
I mean, you might spend 20 minutes more to set it up, but you are safe from having to rely on 3rd party service.
Anyway, kudos to coderholic for creating this and sharing the story.
- matt2000 9y agoWhere is this data available for download?
- theoneone 9y agoGood question!
- guessmyname 9y agoMaxMind databases are the first options you can find if you search for "GeoIP Download" [1][2][3][4][5]. [1] https://www.google.com/search?q=geoip+download https://www.google.com/search?q=geoip+download [2] https://dev.maxmind.com/geoip/legacy/geolite/ https://dev.maxmind.com/geoip/legacy/geolite/ [3] https://dev.maxmind.com/geoip/legacy/downloadable/ https://dev.maxmind.com/geoip/legacy/downloadable/ [4] https://dev.maxmind.com/geoip/geoip2/geolite2/ https://dev.maxmind.com/geoip/geoip2/geolite2/ [5] https://dev.maxmind.com/geoip/geoip2/downloadable/ https://dev.maxmind.com/geoip/geoip2/downloadable/
- timdorr 9y agoIn environments where you don't control the whole stack, such as a plugin or library code.
- gfodor 9y ago- Database needs to be purchased - Database needs to be distributed to your servers - Database can become out of date easily - Database lookup requires going to local disk and having a relatively fast access path/cache for lookups - In general, a local database requires a large amount of effort compared to just running a curl in your PHP code. If you are actually going to use a database, the proper solution does not look like "put it on your webservers" anyway, it looks like "put it on a separate service with a fast caching layer" etc etc. So in other words, the proper solution to decouple yourself from a 3rd party API is to... build a 1st party API. In other words, not a 20 minute job. For small shops, a quick curl during the page load is a 20 minute job.
- heipei 9y agoThere are many ways to quickly get and use a GeoIP DB like MaxMind, most requiring way less than 20 minutes. This is just one example of something I started using recently: docker run -p 8080:8080 -d fiorix/freegeoip curl localhost:8080/json/1.2.3.4 (Repo: https://github.com/fiorix/freegeoip https://github.com/fiorix/freegeoip)
- motet_a 9y agoYes, Docker is great but learning it can definitely require more than 20 minutes. A `curl ipinfo.io` is still simpler.
- deno 9y agoThis is the tax you’re paying for that every time: Connected to 35.165.108.15:443 HTTP/1.1 200 OK Server: nginx/1.8.1 Access-Control-Allow-Origin: * Content-Type: application/json; charset=utf-8 Date: Sun, 02 Jul 2017 08:54:40 GMT X-Content-Type-Options: nosniff Connection: keep-alive Body discarded DNS Lookup TCP Connection TLS Handshake Server Processing Content Transfer [ 4ms | 244ms | 518ms | 525ms | 0ms ] | | | | | namelookup:4ms | | | | connect:248ms | | | pretransfer:767ms | | starttransfer:1292ms | total:1292ms