SitePoint Sponsor

User Tag List

Results 1 to 24 of 24
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Location
    India
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I get the IP addresses of the visitors?

    hello webmasters

    How do I get the IP address of the visitors who are coming to my website.

    thanks in advance

    Regards
    Arun

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    You'll need to look at the site logs on the server.
    Why does it matter?

  3. #3
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,072
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    What server-side lanaguage is in use? eg php, asp, .net etc
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  4. #4
    SitePoint Zealot theentry's Avatar
    Join Date
    Sep 2010
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Site logs, or just put statcounter.com on your site

  5. #5
    Non-Member
    Join Date
    Aug 2010
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    StatCounter is good analytics tool, you can see visitors ip address on it.

  6. #6
    SitePoint Zealot altax's Avatar
    Join Date
    Jul 2009
    Location
    Bangalore
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whats the matter with the ip address. Knowing the region is more than enough for a good webmaster rather than viewing individual ip address. Few service providers keep on change their ip's. Try using Google Analytics. It will help you.

  7. #7
    Non-Member
    Join Date
    Oct 2010
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to write a php script to detect the IP address and obtain the ISP from that. Then you need your own ip-to-country database on your own site and look up the ip there and build your message accordingly. There are some free ip-to-country databases on the net that you can download data from and maintain your own database with that data. No such free ones for more detailed geo-location data though.

  8. #8
    Non-Member
    Join Date
    Oct 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use statcounter.com it helps to know the ip address,country name ,visited date ,visited URL and etc..

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2010
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Register to StatCounter.com, install the script then go to Recent Pageload Activity it will show you detailed reports of the visits including each visit ip.
    Personally I find StatCounter much better then GA, or I just got used with it.

  10. #10
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Location
    India
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    What server-side lanaguage is in use? eg php, asp, .net etc
    i want to use it for blogger blog

  11. #11
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arunch2007 View Post
    hello webmasters

    How do I get the IP address of the visitors who are coming to my website.

    thanks in advance

    Regards
    Arun
    $_SERVER['REMOTE_ADDR']

  12. #12
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    Sorry Kalon but where is the $ standing for? Is it not just CGI.REMOTE_ADDR

  13. #13
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $_SERVER is the array name.

    if you haven't already clicked the link to the php manual's explanation, click it and hopefully all will be explained..

  14. #14
    SitePoint Member idealtech's Avatar
    Join Date
    Nov 2010
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use $_SERVER['REMOTE_ADDR'] to log into a text file.

  15. #15
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    $_SERVER is the array name.

    if you haven't already clicked the link to the php manual's explanation, click it and hopefully all will be explained..
    Yeah I know it is like that for PHP But do we know if that is the program in use, since I haven't seen an answer as yet to SpacePhoenix' question
    What server-side lanaguage is in use? eg php, asp, .net etc

  16. #16
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by donboe View Post
    Yeah I know it is like that for PHP But do we know if that is the program in use, since I haven't seen an answer as yet to SpacePhoenix' question
    since the OP put the request in the PHP forum I think it's safe to assume he/she is looking for a PHP solution unless they state differently in which case their request should not be in this thread.

  17. #17
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,340
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Kalon View Post
    since the OP put the request in the PHP forum ....
    actually, the thread started off, if you can believe it, in the Search Engine Optimization forum, and was moved to the php forum only because of the direction the thread was taking...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  18. #18
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    since the OP put the request in the PHP forum I think it's safe to assume he/she is looking for a PHP solution unless they state differently in which case their request should not be in this thread.
    My question was before it was moved, so let's move on

  19. #19
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by donboe View Post
    My question was before it was moved, so let's move on
    ok, I didn't realise it was moved.

    Quote Originally Posted by arunch2007 View Post
    i want to use it for blogger blog
    if you google "blogger blog" and find out whatever that is, it might tell you what language is being used.

  20. #20
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    ok, I didn't realise it was moved.



    if you google "blogger blog" and find out whatever that is, it might tell you what language is being used.
    I obviously did that, but like many other sites do to my annoyance, the tour was in the language based on my IP location, which is Greek

  21. #21
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    You can use this to get the visitor's IP address!


    Code html:
    <form action="saveip.php" id="ip-form" method="post">
        <fieldset>
            <label>
                What is your IP address:
                <input type="text" name="ip" id="ip" value="" />
            </label>
     
            <input type="submit" value="Send IP Address" />
     
        </fieldset>
    </form>

  22. #22
    SitePoint Evangelist mrwooster's Avatar
    Join Date
    Jan 2006
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are ways of doing it in javascript, but they are not recommended and are not very reliable. To be honest, I think OPs best bet is to use some sort of web widget.

  23. #23
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Immerse View Post
    You can use this to get the visitor's IP address!


    Code html:
    <form action="saveip.php" id="ip-form" method="post">
        <fieldset>
            <label>
                What is your IP address:
                <input type="text" name="ip" id="ip" value="" />
            </label>
     
            <input type="submit" value="Send IP Address" />
     
        </fieldset>
    </form>
    I know this is quite an old thread, but I wonder If you understood the question right? You suggest that someone types in his/her IP Address, but I think the intention of the question was how to get the IP address from people visiting the site without them entering the actual address

  24. #24
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Donboe, I certainly understand the question, I was just being mean


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
  •