Re: Re: [PHP] Geo IP Location help needed...
| From: | Tim Streater | Date: | Tue, 25 Oct 2011 12:25:00 +0000 |
| Subject: | Re: Re: [PHP] Geo IP Location help needed... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-315418@lists.php.net to get a copy of this message | ||
On 25 Oct 2011 at 02:36, DealTek <dealtek@gmail.com> wrote:
> On Oct 24, 2011, at 6:23 PM, Bastien wrote:
>
>> On 2011-10-24, at 9:07 PM, DealTek <dealtek@gmail.com> wrote:
>> If the IP is showing, could there be some left over debug in some function?
>>
>> If the IP is not in your list it could be anything from a new range for a
>> region to IP spoofing or some anonymizer or even an old DB
> simple code on my part - so no debug stuff...
>
> <?php
> $ip = $_SERVER['REMOTE_ADDR'];
> $this = geoip_country_name_by_name($ip);
> echo 'The country you are in is : '.$this;
> ?>
>
> The tester with the error was a friend on his home dsl and also on his
> smartphone (so no IP spoofing from him)...
>
> but maybe the db is old from - Geo IP Location? hmmm . how do I check?
>
> the link does not provide any contact info...
> http://us3.php.net/manual/en/book.geoip.php
You can do a test yourself by hand. Go to www.ripe.net (one of the registries that allocates IP
addresses). Click where it says: Ripe database. In the Search field type your IP address. Under
Sources click on All. Under Types click on inetnum. Under Flags click on B (shows full details).
Then click on Search, and scroll down to look at the results. You need to look at the inetnum object
that contains the IP address of interest, then see Country.
Be aware that what this tells you is where an IP block is registered. Nothing to stop the entity
using it from using those addresses anywhere on the planet, if it has its own network.
--
Cheers -- Tim