On 07/29/2013 06:37 PM, Lim Chris wrote:
Hi Derick,
    This extension enables you to easily get the geo location information, such 
as, country, region, city, latitude, longitude, isp, domain name, time zone, 
ZIP code, area code, mobile information, weather, usage type and elevation for 
an IP address. This extension use the ip database from ip2location.com, and 
free database can be obtained from http://lite.ip2location.com.

    Essentially, this extension enhance the PHP to not only returns the IP 
address in octet, but a more meaningful and useful information for developers 
to work their geo-targeted solution.

    The code can be downloaded at 
https://github.com/chrislim2888/IP2Location-PECL-Extension

https://github.com/tony2001/IP2Location-PECL-Extension

I went ahead, forked it and made some changes that I thought were necessary:
https://github.com/tony2001/IP2Location-PECL-Extension/commits/master

Some of them are purely cosmetical, but some fix memleaks and some change the 
return value
of the functions in case of error (returning a string containing an error 
message is clearly wrong).

I would still prefer to rewrite this extension a bit and drop that global 
variable, which is clearly a Bad Thing (tm), and use a resource instead.
But that will take another half an hour :) and before doing it I'd like to hear 
what other people think.

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to