php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62805 'A1' returned by geoip_country_code_by_name('74.115.0.24');
Submitted: 2012-08-12 23:54 UTC Modified: 2012-11-15 10:24 UTC
From: jasen at treshna dot com Assigned: krakjoe (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.3.15 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jasen at treshna dot com
New email:
PHP Version: OS:

 

 [2012-08-12 23:54 UTC] jasen at treshna dot com
Description:
------------
---
From manual page: http://www.php.net/function.geoip-country-code-by-name
--- 
"Returns the two letter ISO country code on success, or FALSE if the address cannot be found in the database. "



<?php echo geoip_country_code_by_name('74.115.0.24'); ?>

got result: 'A1'

expected result: something from ISO3166 perhaps 'US'

'A1' is actually more useful - it seems to be the code for an 'anonymous proxy'

are there other special codes?




Test script:
---------------
<?php echo geoip_country_code_by_name('74.115.0.24'); ?>

Expected result:
----------------
expected something from ISO3166 perhaps 'US'




Actual result:
--------------
got 'A1'

THIS RESULT IS NOT A BUG.

the documentation should be amended.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-15 10:24 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2012-11-15 10:24 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Updated with a link to Maxmind which includes the descriptions of any special 
codes.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC