Google Blogoscoped

Forum

Geolocation in the forum

Philipp Lenssen [PersonRank 10]

Thursday, June 1, 2006
10 years ago2,851 views

I'm playing around with an IP to location feature for the forum. Now when you click on a name you can see in brackets the country (based on the last post IP). Sometimes however the country is missing, and sometimes the PHP5 script returns an error.

I'm using this API and binary file:
maxmind.com/app/geoip_country

I previously tried this but it returns empty recordsets on IPs I tried with:
ip-to-country.webhosting.info/

I'd like to know if it shows right for your name.
Also, if anyone knows of other good IP2location services...

/pd [PersonRank 10]

10 years ago #

nice.. .. this works for me

/pd [PersonRank 10]

10 years ago #

double nice.. .. :)_

I see some pagerank algo's in play too...

Sam Davyson [PersonRank 10]

10 years ago #

Excuse this post... just want to click my name once it is posted.

Sam Davyson [PersonRank 10]

10 years ago #

Yes. Accurate.

Milly [PersonRank 10]

10 years ago #

Your gizmo has me in the Netherlands, though I'm always posting from the UK.

On a presumably(?) related note, your "Top Google Result for Milly" is for a soft toy company, which looks to be the top result at google.nl and google.co.uk (where my iMilly.com site is actually at about 6th and 7th, respectively).

I'm third at google.com for [Milly], but it's hard to reach the top for a single, common, first name. I think [iMilly] puts me at the top of any Google domain, if you wanted to tweak it.

   (I'm not bothered, but I suppose it's potentially a more useful link, and the existing link is about as far from my low-graphics site as is possible: clicking it was almost a DoS on my poor dialup pipe;).

Tony Ruscoe [PersonRank 10]

10 years ago #

It's correct for me!

Does it use the last IP we've posted with or the first?

Niraj Sanghvi [PersonRank 10]

10 years ago #

>>you can see in brackets the country (based on the last post IP)

It uses the last IP.

Rich Hodge [PersonRank 6]

10 years ago #

Working :)

Tony Ruscoe [PersonRank 10]

10 years ago #

>> It uses the last IP.

So it does – sorry! (I posted that last post from my PSP which had hidden some of Philipp's original comments behind the advert on the right hand side...)

Tony Ruscoe [PersonRank 10]

10 years ago #

Actually, it *was* correct using by connection from home but when I post here from work it's wrongly displaying United States.

Stephan Locher [PersonRank 9]

10 years ago #

Let's check:
I'm posting from Switzerland but expect that it displays germany.

Corsin Camichel [PersonRank 10]

10 years ago #

Hmm Swiss is taking over? nice :)

Mol luega ob er mich erkennt

Stephan Locher [PersonRank 9]

10 years ago #

I've lost:
It displayed the states but I'm using a proxy in germany, and the IP is registred at RIPE with the country code DE...

And on maxmind.com/app/locate_my_ip it shows Germany as expected. Strange...

dpneal [PersonRank 10]

10 years ago #

This is a great little feature. Thanks Philipp.

dpneal [PersonRank 10]

10 years ago #

Oh, except it things I'm from the US. I'm actually from UK. :(

Tony Ruscoe [PersonRank 10]

10 years ago #

Hmmm. maxmind.com/app/locate_my_ip displays me as UK so it must be using a different lookup table or something.

Is it now saying that everyone is from the United States?

Corsin Camichel [PersonRank 10]

10 years ago #

Maybe Philipp should flush the table where he matches the user to the country

Reto Meier [PersonRank 10]

10 years ago #

Nice idea. It's got me correctly as posting from the UK.

Ionut Alex. Chitu [PersonRank 10]

10 years ago #

It doesn't work for me: no country is shown.

Philipp Lenssen [PersonRank 10]

10 years ago #

> Hmmm. www.maxmind.com/app/locate_my_ ... displays me
> as UK so it must be using a different lookup table
> or something.

Maybe it's worth for me to invest in the $50 + $12 for monthly updates. Right now I'm using their free GeoLite database, which they assume is correct 97-98% of the time, whereas their paid GeoIP database is supposed to be 99% correct. Then again it could be kind of expensive for a nice but non-critical feature, in particular because they told me that after half a year, the GeoLite database is presumably more correct than an outdated GeoIP.

Corsin Camichel [PersonRank 10]

10 years ago #

ip2nation.com/ip2nation/Sample ...
ip2nation.com/

Philipp Lenssen [PersonRank 10]

10 years ago #

Milly:
> On a presumably(?) related note, your "Top Google Result
> for Milly" is for a soft toy company...

OK, if you're a regular and your homepage doesn't show correctly let me know here and I'll fix it. I've updated the code to support manual URLs. Yours ought to be fixed now Milly.

Stephan Locher [PersonRank 9]

10 years ago #

I wonder how they come up with the states for my location, if a simple whois of my ip is more accurat.

Is this a manmind error to get more people upgrading to the paid service or is there another reason for this?

Tony Ruscoe [PersonRank 10]

10 years ago #

<< Right now I'm using their free GeoLite database, which they assume is correct 97-98% of the time ... >>

I downloaded the CSV file from the site and that has my country correctly assigned to my IP address range. Maybe you should try importing that into a database rather than using the binary file...?

Travis Harris [PersonRank 10]

10 years ago #

Works for me...

Philipp Lenssen [PersonRank 10]

10 years ago #

I'll give the CSV a try.

Art-One [PersonRank 10]

10 years ago #

Art-One (United States)

Wrong ;-) I'm from Belgium.

As I read these post here, you'd better let everyone manually enter there country & city (even more interesting).

Philipp Lenssen [PersonRank 10]

10 years ago #

As another change in the forum profile, a person's started threads are now showing bold.

Philipp Lenssen [PersonRank 10]

10 years ago #

... and hovering over the link will show the thread's title as tooltip.

/pd [PersonRank 10]

10 years ago #

yes it works, thats nice..I like the hoverover... but theres also a broken URL on hardcoded linkys for person url.... yeah I know my handle so hard to parse :)_

Milly [PersonRank 10]

10 years ago #

> OK, if you're a regular and your homepage doesn't show correctly
> let me know here and I'll fix it. I've updated the code to
> support manual URLs. Yours ought to be fixed now Milly.

Thanks Philipp.

I like the profile page tweaks.

If you're still tweaking ...

   – You could consider putting the PersonRank there too?

   – And, since there's no visual clutter, maybe tooltip all the post links, not just the started ones (if it's a SMOP)?

   – Perhaps give the country a different colour than the name?

   – Where you are using the Google top result, maybe convert "(This is the top Google Result for "XYZ")" into a hyperlink to a Google search on the name? So if it doesn't seem likely/helpful, visitors are just one click away from looking a bit further down the results.

   – On these pages, possibly make all of the Icon + Name + PersonRank bar into one link (tooltipped with the Rank)? Just so it's a bigger and more intuitive click-target.

   – Finally, though it didn't find favour last time I suggested it, I still think it would be very cool if you auto-converted anything posted between square brackets into a default Google search.

BTW, thanks for making the RSS into a full feed: much nicer :)

Oh, and many congratulations on 55 Ways! (Shouldn't that have a sidebar link?)

Philipp Lenssen [PersonRank 10]

10 years ago #

Did pretty much all you suggested Milly! Only the country display is disabled temporarily, as it hangs the page for some IPs...

/pd [PersonRank 10]

10 years ago #

yea, this is a lot better, you may want to look into the personrank bar..
mine shows blank ..

Philipp Lenssen [PersonRank 10]

10 years ago #

Fixed!

Sam Davyson [PersonRank 10]

10 years ago #

Woah! Nice new person pages.

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!