Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: IP address

  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IP address

    I'm creating a weather section on my new website. Is it possible to get someones IP address and then calculate the sunrise/sunset from the IP? If it is possible where do I look for it at.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    No not with HTML. You will need a server side language to get their IP address. Once you do this you will have to some how trace back where the ip address originated from and then from that you might be able to do what you want. I found this
    http://www.linuxjournal.com/article/7856

    I don't know how accurate the data is as it says my IP comes from California, yet I am in Florida.

    There is also this
    http://www.ip2location.com/
    which is a little expensive.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    That's called dynamic DNS: your IP address is not unique to you, Aero, because it's selected from a pool of avalible addresses.

    I have the same problem. I'm very clearly a thoroughbred Londoner, but apparently I'm from Gloucester?

  • #4
    New Coder
    Join Date
    Sep 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What about a zip code. If a user types in as there zip "55555" then the forecast for that area comes up. (I could also use iframes). What would be the best way to do this?

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Zip code might work better. I just found this
    http://www.weatherplus.com/weatherne...29/detail.html
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Sep 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks, that helped.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •