I need script for displaying the user's IP address on the webpage

Discussion in 'HTML & Website Design' started by tradeepak, Mar 29, 2007.

  1. #1
    I need script for displaying the user's IP address on the webpage

    plz help

    If possible I would also like to know how to get the Ip address of the user when the fill a form and submit to me.
     
    tradeepak, Mar 29, 2007 IP
  2. xd2

    xd2 Peon

    Messages:
    694
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Would help if you put what language you are using, if php I have a script you can have.
     
    xd2, Mar 29, 2007 IP
  3. conceptcrew

    conceptcrew Active Member

    Messages:
    547
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #3
    even if he or she is using html, you can still use .htaccess to permit the php to run
     
    conceptcrew, Mar 29, 2007 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
  5. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #5
    PHP actually sets the users IP address as a variable. All you need to do is tell PHP what to do with it.

    <?php echo($_SERVER['REMOTE_ADDR']); ?>

    The above would print the IP address of the user viewing the website.
     
    PHPGator, Mar 29, 2007 IP
  6. tradeepak

    tradeepak Banned

    Messages:
    1,518
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I dont use php. anyway i used google and got a script from it.
     
    tradeepak, Mar 31, 2007 IP