473,698 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1717
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...@airs pace-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
1212
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 provinces, towns or cities, villages or other places of interest in the world.
3
2892
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 service or similar thing that tells me the country and state/province of incomming IP address. I am sure it is possible but i don't know who sells that service.
84
3904
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: Hireability Portability Flexibility The likely candidates seem to be Java, VB.Net, C, C++, C#.
4
3850
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 point? For example, i know two positions from my gps, longitude and latitude. how to know to caculate how many miles between these two points. There are many websites doing this in search, enter the miles as radius, and only show the results fall in...
4
2204
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 active/passive. I know that the capability exists within the Oracle RAC product
8
2355
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 point over the map. How can this be done in PHP ? I know you can do everything in GD, but does something similar already exist
3
3612
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 postal-geographical:geographical:lat:1234.567,long:987.654 defines an IANA-maintained registry of URI Schemes. These registries include the Permanent and Provisional URI Schemes. The registry is: http://www.iana.org/assignments/uri-schemes.html . I find no such entry there.
1
3196
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 follows: The code below is for the first page:session_start is in line 3 <link href="css/jobSheet.css" rel="stylesheet" type="text/css" /> session_start();
1
3609
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), OnPaint is not getting called... Here is the relevent code: I'm trying to create a "rubber band" rectangle effect on my form. Private Sub HighlightSectionOfTrack(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles...
0
8676
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.