Results 1 to 3 of 3
  1. #1

    show ip script anyone?

    hi there

    i was hoping someone could point me to where i could find a simple little script that would show the ip of a visitor to my site. Something along the lines of shomyip.com

    thank you!

  2. #2
    PHP Code:
    <?php

    $ip 
    $_SERVER['REMOTE_ADDR'];
    echo 
    $ip;

    ?>
    Simple enough?

    Lux

  3. #3
    Join Date
    Apr 2003
    Location
    Atlanta, Jawja
    Posts
    3,066
    Building up on this...
    PHP Code:
    <?php

    $ip 
    $_SERVER['REMOTE_ADDR'];
    $hostname = @gethostbyaddr ($_SERVER['REMOTE_ADDR']);
    echo 
    $ip;  //example:  1.2.3.4
    echo $hostname//example:  A1B2C3D4.ipt.aol.com
    ?>
    Douglas Hazard - Certifiable Sports Junkie and Sports Community Enthusiast

    Host of Two Cents Radio - Follow @TwoCentsRadio on Twitter (@BearlyDoug on Twitter)

Posting Permissions

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