Calcudoku puzzle forum
https://www.calcudoku.org/forum/

Flagless
https://www.calcudoku.org/forum/viewtopic.php?f=18&t=163
Page 1 of 1

Author:  randomfruit  [ Mon Mar 05, 2012 8:04 pm ]
Post subject:  Flagless

So the person from this country:
http://www.calcudoku.org/en/2012-03-05/5/fl/

does not have a national flag to show. [confused]
I just had a 404 error when trying to access the URL.

Author:  pnm  [ Mon Mar 05, 2012 10:52 pm ]
Post subject:  Re: Flagless

randomfruit wrote:
So the person from this country:
http://www.calcudoku.org/en/2012-03-05/5/fl/

does not have a national flag to show. [confused]
I just had a 404 error when trying to access the URL.


After the "fl/" there should have been a 2 letter country code.

Whenever someone accesses the site, and their IP is not in my "IP to country" database,
it does an automatic lookup at ip2location.com

_but_ I'm limited to 20 such lookups a day, so presumably those were used up already..

Patrick

Author:  johne  [ Wed Mar 07, 2012 2:17 am ]
Post subject:  Re: Flagless

Try http://api.hostip.info/get_html.php where there are unlimited lookups which return ip address, country code and country name.

And the same site has all the flags at http://api.hostip.info/images/flags/CC.gif where CC is the country code. They are a bit large but look OK when reduced in size.

Author:  pnm  [ Wed Mar 07, 2012 10:24 am ]
Post subject:  Re: Flagless

johne wrote:
Try http://api.hostip.info/get_html.php where there are unlimited lookups which return ip address, country code and country name.

Great tip, thanks! :-)

Author:  pnm  [ Thu Mar 08, 2012 8:15 pm ]
Post subject:  Re: Flagless

pnm wrote:
johne wrote:
Try http://api.hostip.info/get_html.php where there are unlimited lookups which return ip address, country code and country name.

Great tip, thanks! :-)

I had to switch back to ip2location.com, there were many IP addresses for
which hostip.info returned "unknown", and ip2location.com had all the info...

Patrick

Author:  johne  [ Fri Mar 09, 2012 12:08 am ]
Post subject:  Re: Flagless

Sorry about that. I had no way to test the results for many addresses so assumed it worked for most. I guess it is free so you can't expect too much.

If you are maintaining addresses in a database then try http://software77.net where you can download a database which is updated daily as far as I can tell. Over 4 billion addresses which probably matches the ip2location database. And this one is free. Unfortunately they don't offer an AJAX service.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/