Re: [PEPr] Proposal for Networking::GeoIP
| From: | Hans Lellelid | Date: | Tue, 22 Jun 2004 19:52:28 +0000 |
| Subject: | Re: [PEPr] Proposal for Networking::GeoIP | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31107@lists.php.net to get a copy of this message | ||
Hi Philippe,
Philippe Jausions wrote:
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. 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. I believe in integration where it makes sense, but I just don't see the advantage in this case. Hans