|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58232 Including 'country_name' in geoip_record_by_name
Submitted: 2008-06-12 11:07 UTC Modified: 2008-06-12 14:14 UTC
From: jason at omniti dot com Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.2.5 OS: SunOS 5.10
Private report: No CVE-ID: None
 [2008-06-12 11:07 UTC] jason at omniti dot com
It seems that geoip_record_by_name aims to be an all-encompassing function for as much City details as possible.

For some reason, our geoip_country_name_by_name was not working correctly, so I've patched our record_by_name function to include Country Name.

It might be helpful to include this in the array returned by geoip_record_by_name since it will make the function more complete, and doesn't incur any additional overhead since the lookup has already been performed at that point.

Reproduce code:
        add_assoc_string(return_value, "country_name", (gir->country_name == NULL) ? "" : gir->country_name, 1);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-12 13:12 UTC]
It is fixed in CVS. Please tell me if it's working for you, I have also added country_code3.

Nice catch by the way.
 [2008-06-12 13:20 UTC] jason at omniti dot com
Works Perfectly. Thanks :)
 [2008-06-12 14:14 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Jul 09 08:01:26 2020 UTC