ip location appears on web page

F

FrederickRiley

Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.

Any help would be appreciated.
Carol Riley
 
H

Harlan Messinger

Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.

The IP address doesn't tell you what town the user is located in.
 
D

dorayme

<[email protected]
Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.

Any help would be appreciated.
Carol Riley

Yes, it is very important for those folks who simply do not know
where they are. For example, if they are lost in the back country
behind Mudgee... It is very good hearted of you to be doing this.
Good luck.
 
J

Jonathan N. Little

Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.


As the others have said, the IP does not show you where the person is
but where the server that is suppling his connection is. They may not be
in the same town and proxies further complicate the situation. Forget
the idea.
 
R

richard

Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.

Any help would be appreciated.
Carol Riley

For that, you will need to expand your horizons and learn Javascript (
which is not the same as Java) as well as some PHP.
There are literally zillions of sites that have premade scripts for
this purpose.

But alas, knowing the IP location might not get you the actual
location of the user. For instance, I may be in Florida and using a
dialup service located in Seattle, Washington.
Even a broadband service, such as satellite might not give you the
user's proper location.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Wed, 20 Feb 2008 03:47:32 GMT
Jonathan N. Little scribed:
As the others have said, the IP does not show you where the person is
but where the server that is suppling his connection is.

From what I've heard (ie, newsgroup rumors), even that is iffy. Most
people who seem to know about it say the same thing you do below.
 
J

Jonathan N. Little

Neredbojias said:
Well bust mah britches and call me cheeky, on Wed, 20 Feb 2008 03:47:32 GMT
Jonathan N. Little scribed:
From what I've heard (ie, newsgroup rumors), even that is iffy. Most
people who seem to know about it say the same thing you do below.

Got a friend who has been fooling around with Tor and Vidalia. Whatever,
how much fun can one derive from fooling Google into selecting Japanese
or German for your language...
 
F

FrederickRiley

As the others have said, the IP does not show you where the person is
but where the server that is suppling his connection is.

This is close enough for my purposes.
 
F

FrederickRiley

For that, you will need to expand your horizons and learn Javascript (
which is not the same as Java) as well as some PHP.
There are literally zillions of sites that have premade scripts for
this purpose

Do you know one?
 
F

FrederickRiley

Yes, it is very important for those folks who simply do not know
where they are. For example, if they are lost in the back country
behind Mudgee... It is very good hearted of you to be doing this.
Good luck.


Thanks so much
 
F

FrederickRiley

The IP address doesn't tell you what town the user is located in.

For my purposes the server location is just fine, I have my reasons
for doing this that I don't feel like explain since I do not like
typing.

So if anyone know javascript (Or a site to find this) that would show
theSERVER location I would be grateful. I do have my expertise, web
design is NOT it!
 
R

rf

For my purposes the server location is just fine, I have my reasons
for doing this that I don't feel like explain since I do not like
typing.

So if anyone know javascript (Or a site to find this) that would show
theSERVER location I would be grateful. I do have my expertise, web
design is NOT it!

Nothing to do with Javascript. This must be done server side.

The topic comes up every month or so. Search the archives for prior
discussions.
 
H

Harlan Messinger

richard said:
For that, you will need to expand your horizons and learn Javascript (
which is not the same as Java) as well as some PHP.
There are literally zillions of sites that have premade scripts for
this purpose.

How can there be *literally* zillions of something when "zillions" is an
inherently figurative quantity?
 
R

rf

Harlan Messinger said:
How can there be *literally* zillions of something when "zillions" is an
inherently figurative quantity?

I'd like to see *one* that does it with Javascript (which is not the same as
Java) :)
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Wed, 20 Feb 2008 04:36:56
GMT Jonathan N. Little scribed:
Got a friend who has been fooling around with Tor and Vidalia.
Whatever, how much fun can one derive from fooling Google into
selecting Japanese or German for your language...

Doesn't sound like much fun to me and I don't even have a life. In fact my
greatest chuckle of 2007 was when dorayme was trying to concoct a
grammatical rationale for her lack of capitalizing her handle. Sad, I
know...
 
T

Toby A Inkster

rf said:
I'd like to see *one* that does it with Javascript (which is not the
same as Java) :)

Not too tricky.

Client side Javascript is almost a given. Page author using the service
includes the following on their page:

<script src="http://location-service.example.net/location.js"
type="text/javascript"></script>

The script file "location.js" is generated programmatically by the
example.net web server -- it inspects the requesting IP address, looks it
up in a big database and returns a Javascript file like this:

var ip_address = '123.45.67.89';
var location_town = 'London';
var location_country_code = 'GB';
var location_country_name = 'United Kingdom';
var location_latitude = 51.52231;
var location_longitude = -0.10166;

These variables can then be used by the page author in their scripts.

Whatsmore, that word "programmatically" above could even refer to
Javascript. Server-side Javascript is reasonably popular (probably in the
top 10 server-side scripting languages).

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 21 days, 16:23.]

Bottled Water
http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/
 
A

Andy Dingley

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page.

There is no simple relation between IP and geography. Most IP that
you see belong to large national ISPs, and these could are resolvable
to no more than a large region at best.

It's also far from simple to do this lookup, and even harden to
maintain the lookup table. If you want to use such a service, you're
going to have to buy it in from someone operating such a database.
They do exist, they mostly cost money, they're often not reliable
(sometimes not even to the right country!). Web searching will show
you a list.

On the whole, I wouldn't bother. The intawebs just aren't structured
to make this information easy or accurate.
 
M

Mike Barnard

Hi,

I am trying to create a web page where the person browsing my web page
will have the town of there IP location appears on the page. For
example a person in Springfield PA browsing the page will see the word
"Springfield" whereas someone browsing the same page from Newark NJ
will see the word "Newark" instead.

Any help would be appreciated.
Carol Riley

Just butting in here.

I often find pop up windows from 'Friendfinder' or something who tell
me that there are people in my village who are "looking for me" [1].
How do they know the name of my village? My exchange is 4km away in a
differently named town, my domain is registered with a company based
in scotland. There are no servers, exchanges or anything else techy in
the village. Sometimes the ads say Brighton instead, though.

What info can they find to narrow it down to the village? I'm really
curious now.

[1] Odd thing is, Ferring, UK, where I live has the greatest
percentage of over 80's in any UK area. I never see a granny showing
her bits to me in these ads.
 
R

rf

Toby A Inkster said:
Not too tricky.

Client side Javascript is almost a given. Page author using the service
includes the following on their page:

<script src="http://location-service.example.net/location.js"
type="text/javascript"></script>

The script file "location.js" is generated programmatically by the
example.net web server -- it inspects the requesting IP address, looks it
up in a big database and returns a Javascript file like this:

var ip_address = '123.45.67.89';
var location_town = 'London';
var location_country_code = 'GB';
var location_country_name = 'United Kingdom';
var location_latitude = 51.52231;
var location_longitude = -0.10166;

These variables can then be used by the page author in their scripts.

Whatsmore, that word "programmatically" above could even refer to
Javascript. Server-side Javascript is reasonably popular (probably in the
top 10 server-side scripting languages).

Perhaps I should have specified *only* [client side] Javascript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top