Re: [PEPr] Proposal for Networking::GeoIP
| From: | Philippe Jausions | Date: | Tue, 22 Jun 2004 20:12:48 +0000 |
| Subject: | Re: [PEPr] Proposal for Networking::GeoIP | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31112@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
Hi Philippe, Philippe Jausions wrote:Have you performance tested the binary format vs. pure SQLLite (CVS import) database? Just curious here...Have you looked at http://ip-to-country.webhosting.info/ which also provide a free IP-to-country database? Would your package be able to work with it? Just wondering (since one database import is probably enough...)Yes, I have looked at this. I don't really see any advantage to supporting this database format. For one thing the GeoIP class is designed to work with the *binary* GeoIP database format (Maxmind) and not the CSV format. Most of the functionality provided by the class centers around the parsing of the binary data format. Writing a CSV version would be completely different (and would be a lot heavier as it would need to interop w/ a database server, etc.).
Also the GeoIP class does a lot more than ip-to-country mapping, so developing a driver-based system wouldn't make a lot of sense since the GeoIP driver would offer a very different API from the ip-to-country drivers.Right. I have experience using MaxMind credit card fraud service, which however is web-service based.
There is a Net_Geo package in PEAR which does only ip-to-country (afaik) using online services. It would make sense to me that other drivers that provide the same information could be added to this class. In fact Net_Geo could use Net_GeoIP for the GeoIP binary database format (Maxmind) rather than write its own parsing methods.+1 on that. -Philippe