API not outputting the same as front page

General Discussion about IP Address Lookup caveats, technology, ideas, etc.

Moderator: Moderators

API not outputting the same as front page

Postby debugdom on Thu Feb 16, 2006 10:44 pm

Hi-

First i'd like to say, thanks for the super rad database.

When I goto the front page and put in a IP address such as 217.111.22.98 it returns:

(guessed) Oberursel, GERMANY
IP found in 0.022 seconds

however if the same IP is entered into the api it returns:

This is the Hostip Lookup Service hostip inapplicable (Unknown city) GERMANY DE

is there anyway that i can get the API to return a 'guessed' value?

thanks in advance

dom

p.s i've written a php script that takes the users ip and then returns their current weather if anyone wants a copy give me a pm.
debugdom
n00b
 
Posts: 4
Joined: Thu Feb 16, 2006 10:33 pm

Re: API not outputting the same as front page

Postby bfolkens on Mon Feb 20, 2006 7:16 pm

debugdom wrote:Hi-

First i'd like to say, thanks for the super rad database.

When I goto the front page and put in a IP address such as 217.111.22.98 it returns:

(guessed) Oberursel, GERMANY
IP found in 0.022 seconds

however if the same IP is entered into the api it returns:

This is the Hostip Lookup Service hostip inapplicable (Unknown city) GERMANY DE

is there anyway that i can get the API to return a 'guessed' value?

thanks in advance

dom

p.s i've written a php script that takes the users ip and then returns their current weather if anyone wants a copy give me a pm.


Remember, the lookups on the front page use the guessing algorithm - whereas in the api you have the option of using that or not... If the city is unknown but the country is correct - it'll be explicit and not guess.
bfolkens
Site Admin
 
Posts: 154
Joined: Tue Feb 22, 2005 8:09 am

Postby debugdom on Mon Feb 20, 2006 8:08 pm

Thanks, I actually found an old post that spoke of the same issue and I have changed my code accordingly.
debugdom
n00b
 
Posts: 4
Joined: Thu Feb 16, 2006 10:33 pm


Return to IP Address Lookup

Who is online

Users browsing this forum: No registered users and 7 guests

cron