473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Getting your geographical location

Hey,

How does one going about their user's geographical location? Is that
even a PHP question.

For example, a site may say "Find others near Boston", but if you were
in New York, it would say "Find others in New York"

Thanks.
Aug 13 '08 #1
3 1707
rpupkin77 wrote:
Hey,

How does one going about their user's geographical location? Is that
even a PHP question.

For example, a site may say "Find others near Boston", but if you were
in New York, it would say "Find others in New York"

Thanks.
Hi,
Not really a PHP question, but I've used maxminds geoip product and it
is quite good.

http://www.maxmind.com/app/php

This document tells you the various methods of how to use PHP with it.

--
Hope this helps, Cheers
Leigh Finch
www.phpmaniac.net
Aug 13 '08 #2
If you are really clever you could also ask 'whois' and parse the
reply. I think that's how MaxMind and others have built their
databases. Here you get the most current and most precise information
available via net infrastructure.

But be cautios: The problem I had with MaxMind's database was that of
many users connected via ISP I only got the ISP's location which
frequently is a few hundred miles away. From my current office in
Germany I am connected to the net via Italy giving me Italian Google
search pages...

virtuPIC
--
Airspace V - international hangar flying!
http://www.airspace-v.com/ggadgets for tools & toys
Aug 13 '08 #3
On 13 Aug, 07:18, virtuPIC <WebMas...@airspace-v.comwrote:
If you are really clever you could also ask 'whois' and parse the
reply. I think that's how MaxMind and others have built their
databases. Here you get the most current and most precise information
available via net infrastructure.

But be cautios: The problem I had with MaxMind's database was that of
many users connected via ISP I only got the ISP's location which
frequently is a few hundred miles away. From my current office in
Germany I am connected to the net via Italy giving me Italian Google
search pages...

virtuPIC
--
Airspace V - international hangar flying!http://www.airspace-v.com/ggadgetsfor tools & toys
I'd also question the usefulness of IP address to geography mappings.
The easiest way to find out where a user is would be to **ask** them!
Of course, most users tend to think in terms of towns/cities and
countries rather than lattitude and longitude - and you'd want the
results in a strucutred format - which rather suggests clicking on
selection criteria rather than free text input.

IIRC the phpclassess website does geographical data manipulation to
find local user groups. Also, The CIA World Fact Book data seems to
published on a redistributable basis - although getting hold of the
raw data & metadata might be tricky. There may well be published
public listings of cities in the world - try google for a start. If
that trail goes cold, try chasing up from micro-formats and/or Mozilla
labs (who are actively looking at pushing data manipulation out to the
browser).

C.
Aug 13 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: fausty | last post by:
Hi, I have a question. I hope someone can help me. :-) I'm writing an internet marketing application in php and I need to import inside a mysql db all data about countries, district or...
3
by: A.M | last post by:
Hi, We have special kind of service that covers just north on America (US and Canada), so we want to redirect users comming from another country to another page. I am looking for a web...
84
by: Bibby | last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled in C, C++ and VB6. Which would be the best language to focus my attention to regarding the following considerations: ...
4
by: Nick | last post by:
hi, guys I don't know where should I put this post, because this is a general question, not really a c# question. The question is how to caculate the real distance between two geographical...
4
by: torrance_bloke | last post by:
Hi, Does anyone know if DB2 has the capability to cluster in an active/active mode over geographical distances. I am aware of the replication tools and HADR capabilities but this is more...
8
by: Bob Bedford | last post by:
Hello, I've some geographical coordinates and I'd like to put them on a map. Example: I've the map of the USA. Once I've selected Chicago, I'd like a point-cross or what ever, on the Chicago...
3
by: Elvey | last post by:
Is there a URI scheme for (geographical) map or address location? e.g. something like postal-geographical:postal:123_Main_St,Anywhere_AW,USA...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
1
by: sean | last post by:
I'm trying to create "rubber-band" rectangles by overriding the OnPaint method to place rectangles on top of all graphic controls, but when I call Me.Invalidate() (when the user moves the mouse),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.