Results 1 to 5 of 5

Thread: Ip script

  1. #1
    Join Date
    Sep 2005
    Location
    Bogota, Colombia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Ip script

    Hello
    I have a problem...

    How i can write in the page the Ip of the user?

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default Quick Google Search

    Here's what I found in a quick Google Search.

    Code:
    :
    <?php 
        echo 'User IP Address: ' .$_SERVER['REMOTE_ADDR']. ''; 
    ?>
    I hope that works, I've never nedded anything like an ip code.

  3. #3
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default Ohh Yeah

    Oh I forgot to tell you to put this code where you want the ip to show.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <?php echo($_SERVER['REMOTE_ADDR']); ?>
    The rest is superfluous. Of course, using PHP, this means you must have PHP installed and enabled on your server.
    Ben: there is an edit button on your posts. Use this if you want to add something, rather than double-posting.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Sep 2005
    Location
    Bogota, Colombia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks you

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
  •