IP collection

Discussion in 'Web Design & Programming' started by daz, Dec 23, 2010.

  1. daz

    daz Geek

    Likes Received:
    0
    Trophy Points:
    16
    Hello.
    I am relatively new to JavaScript programming, and I was wandering is there a script that allow to collect IP addresses of visitors on my particular website for traffic measuring purposes only. I just want a clear view of traffic on my site.

    But even more importantly I am interested in number of different users that are visiting my website, I just want my costume data. is it relatively possible to do?

    Regards
    Dariusz Krak
     
  2. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    I don't think you can with Javascript, its usualy accessable via server side scripting.

    e.g. PHP

    PHP:
    echo $_SERVER['REMOTE_ADDR'];
    It can be mixed with javascript

    HTML:
    <script type="text/javascript">
    alert("<?php echo $_SERVER['REMOTE_ADDR'] ?>");
    </script>
     
  3. daz

    daz Geek

    Likes Received:
    0
    Trophy Points:
    16
    Thank you. I have don some research in to the topic, and it is a lot more complex that I have previously anticipated.
     

Share This Page