Professional Web Applications Themes

get IP and even geographical region of IP ? - PHP Development

I wonder if it is possible to get the IP of the visitor via PHP ? And additionally, get the geographical region for that IP ? It would be cool to be able to build a $url to a page which is most relevant for the visitor. Is this possible ? If so, how ?...

  1. #1

    Default get IP and even geographical region of IP ?

    I wonder if it is possible to get the IP of the visitor via PHP ?
    And additionally, get the geographical region for that IP ?

    It would be cool to be able to build a $url to a page which is most relevant
    for the visitor.

    Is this possible ?
    If so, how ?


    Peter Guest

  2. #2

    Default Re: get IP and even geographical region of IP ?

    Peter Van Hove wrote:
     

    http://ip-to-country.com/

    --
    Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
    Chris Guest

  3. #3

    Default Re: get IP and even geographical region of IP ?

    Hello,

    on 06/04/2005 06:34 PM Peter Van Hove said the following: 

    You may want to take a look at this class that does exactly that:

    http://www.phpclasses.org/netgeoclass


    --

    Regards,
    Manuel Lemos

    PHP Classes - Free ready to use OOP components written in PHP
    http://www.phpclasses.org/

    PHP Reviews - Reviews of PHP books and other products
    http://www.phpclasses.org/reviews/

    Metastorage - Data object relational mapping layer generator
    http://www.meta-language.net/metastorage.html
    Manuel Guest

  4. #4

    Default Re: get IP and even geographical region of IP ?

    $_SERVER[REMOTE_ADDR] contains the persons IP, you can make a script
    that saves it into a text file, database etc and generate links that go
    to an IP lookup site (eg
    http://ws.arin.net/cgi-bin/whois.pl?queryinput=192.168.0.0)

    Peter Van Hove wrote: 
    Exyle Guest

  5. #5

    Default Re: get IP and even geographical region of IP ?

    Peter Van Hove wrote: 

    You can use http://www.geobytes.com/IpLocator.htm for lots of
    interesting stats, although it's accuracy isn't always 100%

    They sell something or other too where you can serve different pages
    based on the IP.
    Chris Guest

  6. #6

    Default Re: get IP and even geographical region of IP ?

    > You can use http://www.geobytes.com/IpLocator.htm for lots of interesting 

    Indeed, it finds me on the other side of the globe ;-)


    Peter Guest

  7. #7

    Default Re: get IP and even geographical region of IP ?

    Peter Van Hove wrote: 
    >
    >
    > Indeed, it finds me on the other side of the globe ;-)[/ref]

    I might be on another planet. It does not find me at all 8-)
    XP Guest

Similar Threads

  1. Replies: 1
    Last Post: October 7th, 06:18 AM
  2. Flex 1.5 and geographical data
    By Michael2179 in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 24th, 02:33 PM
  3. Sort Region
    By mar0364 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 3
    Last Post: September 12th, 12:47 PM
  4. Replies: 3
    Last Post: October 14th, 05:49 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139