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 9 of 9

Thread: IP Logging

  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IP Logging

    Is it possible to log user IPs through html...to be sure a person isnt posting as someone else
    Last edited by WA; 01-22-2003 at 01:26 AM.
    A computer is like air conditioning...open windows and it stops working.

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    http://javascriptkit.com/script/script2/displayip.shtml

    REMOTE_ADDR

    i like your sig hehehe

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thx

    hehe...thank you
    A computer is like air conditioning...open windows and it stops working.

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you dont have server side access?
    you could simply echo an IP in one line of code
    that script wont log an IP just display it

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #5
    New Coder
    Join Date
    Nov 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ohhh

    it displayed but i want to log it...do you have a messenger? yahoo or msn?
    A computer is like air conditioning...open windows and it stops working.

  • #6
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    um, yea check my profile
    sorry i wasnt paying attention at first, doing 2 much at once
    but you couldnt log an IP with html

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #7
    New Coder
    Join Date
    Jul 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down Heyy....

    This script works wrong.It shows my IP.But it's worng IP.

    I check my IP by the Dial-Up Wizard in WinXP(you know it has properties of client and server IPs).

    It is so... so yuck....
    Do you know Hakki Ocal ?

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that script will only work in you have server side includes supported on your server... and even if you did i wouldnt use javascript to then put it in the box... id use <input ....... value="<!--#echo var="REMOTE_ADDR"-->"...

    presuming you have PHP supported, heres something that should store the IP address...
    PHP Code:
    <?php
    // get the IP
    $ip $_SERVER["REMOTE_ADDR"];
    $ip .= "\n" implode(''file('ips.dat'));

    // write into the IPs file
    $fq fopen("ips.dat","w");
    fwrite($fq$ip); 
    fclose($fq);
    ?>
    hope that helps you abit...
    Last edited by redhead; 02-13-2003 at 10:19 PM.
    redhead

  • #9
    New Coder
    Join Date
    May 2009
    Posts
    47
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by redhead View Post
    that script will only work in you have server side includes supported on your server... and even if you did i wouldnt use javascript to then put it in the box... id use <input ....... value="<!--#echo var="REMOTE_ADDR"-->"...

    presuming you have PHP supported, heres something that should store the IP address...
    PHP Code:
    <?php
    // get the IP
    $ip $_SERVER["REMOTE_ADDR"];
    $ip .= "\n" implode(''file('ips.dat'));

    // write into the IPs file
    $fq fopen("ips.dat","w");
    fwrite($fq$ip); 
    fclose($fq);
    ?>
    hope that helps you abit...
    How do I get this to add the IPs one per line?

    right now it will just add them on one line.


  •  

    Posting Permissions

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