ip location appears on web page

Discussion in 'HTML' started by FrederickRiley@gmail.com, Feb 20, 2008.

  1. Guest

    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
     
    , Feb 20, 2008
    #1
    1. Advertising

  2. wrote:
    > 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.
     
    Harlan Messinger, Feb 20, 2008
    #2
    1. Advertising

  3. dorayme Guest

    In article
    <
    >,

    wrote:

    > 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.

    --
    dorayme
     
    dorayme, Feb 20, 2008
    #3
  4. wrote:
    > 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.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 20, 2008
    #4
  5. richard Guest

    On Tue, 19 Feb 2008 19:23:34 -0800 (PST),
    wrote:

    >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.
     
    richard, Feb 20, 2008
    #5
  6. Neredbojias Guest

    Well bust mah britches and call me cheeky, on Wed, 20 Feb 2008 03:47:32 GMT
    Jonathan N. Little scribed:

    > wrote:
    >> 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.


    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.

    > They may not be
    > in the same town and proxies further complicate the situation. Forget
    > the idea.


    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Feb 20, 2008
    #6
  7. Neredbojias wrote:
    > 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.
    >
    >> They may not be
    >> in the same town and proxies further complicate the situation. Forget
    >> the idea.

    >


    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...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 20, 2008
    #7
  8. Guest


    >
    > 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.
     
    , Feb 20, 2008
    #8
  9. Guest


    >
    > 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?
     
    , Feb 20, 2008
    #9
  10. Guest


    >
    > 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
     
    , Feb 20, 2008
    #10
  11. Guest


    > 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!
     
    , Feb 20, 2008
    #11
  12. Guest


    > >> They may not be
    > >> in the same town and proxies further complicate the situation. Forget
    > >> the idea



    It does not need to be perfect for my purposes
     
    , Feb 20, 2008
    #12
  13. rf Guest

    <> wrote in message
    news:...
    >
    >> 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!


    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.

    --
    Richard.
     
    rf, Feb 20, 2008
    #13
  14. richard wrote:

    >
    > 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?
     
    Harlan Messinger, Feb 20, 2008
    #14
  15. rf Guest

    "Harlan Messinger" <> wrote in message
    news:...
    > richard wrote:
    >
    >>
    >> 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?


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

    --
    Richard.
     
    rf, Feb 20, 2008
    #15
  16. Neredbojias Guest

    Well bust mah britches and call me cheeky, on Wed, 20 Feb 2008 04:36:56
    GMT Jonathan N. Little scribed:

    > Neredbojias wrote:
    >> 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.
    >>
    >>> They may not be
    >>> in the same town and proxies further complicate the situation.
    >>> Forget the idea.

    >>

    >
    > 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...

    --
    Neredbojias
    http://www.neredbojias.com/
    Great sights and sounds
     
    Neredbojias, Feb 20, 2008
    #16
  17. rf wrote:

    > 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/
     
    Toby A Inkster, Feb 20, 2008
    #17
  18. Andy Dingley Guest

    On 20 Feb, 03:23, wrote:
    > 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.
     
    Andy Dingley, Feb 20, 2008
    #18
  19. Mike Barnard Guest

    On Tue, 19 Feb 2008 19:23:34 -0800 (PST),
    wrote:

    >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.
     
    Mike Barnard, Feb 20, 2008
    #19
  20. rf Guest

    "Toby A Inkster" <> wrote in message
    news:5n.co.uk...
    > rf wrote:
    >
    >> 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).


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

    --
    Richard.
     
    rf, Feb 20, 2008
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGh1cndpdHo=?=
    Replies:
    1
    Views:
    461
    Teemu Keiski
    Apr 10, 2004
  2. buzz
    Replies:
    1
    Views:
    331
    Joerg Jooss
    Sep 2, 2005
  3. Luke Dalessandro
    Replies:
    0
    Views:
    614
    Luke Dalessandro
    Jan 15, 2006
  4. King of Red Lions

    code appears on page

    King of Red Lions, Nov 4, 2004, in forum: HTML
    Replies:
    7
    Views:
    386
    Jukka K. Korpela
    Nov 5, 2004
  5. Replies:
    2
    Views:
    93
    The Natural Philosopher
    Feb 20, 2008
Loading...

Share This Page