[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] Determining where a web user comes from by IP
On Wed, Jan 31, 2001 at 02:57:29PM +1100, Lucian Daniel Kafka wrote:
> Does anyone know of some existing code (preferable PHP) that will give me
> the region a web browser comes from?
There is no guaranteed method.
You can get a rough idea by reverse-looking up the name from the IP
number and then getting it from the domain.
You can get a slightly better idea from running a traceroute on the
IP number and looking at the upstream nodes that they are connected
through (this is expensive in terms of CPU and network, do not automate
it if you are expecting more than a handful of hits or at least set it
up on your own server to eat your bandwidth not ours).
There exists a mapping of the 64000 possible combinations of the
most significant 16 bits of an IP number. Not all of these can be
mapped sensibly to a location but quite a lot can be, not sure where
to get this map from or exactly how many details it contains, you
will have to search around.
You can get routed information out of SNMP ports on some internet
nodes and this can work out some info about the connectivity of
various parts of the internet. Some of this can be automated, there
was a talk about it during the recent linuxconf. It isn't 100%
accurate.
--
S1G: 18990954 seconds remaining - Tel
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.