postIt

        Post-It sticky notes with PasteBin sense

  • 03:30:08 am on March 1, 2010 | # | 0
    Tags: ,

    1
    2
    
    $first_ip=$_SERVER['REMOTE_ADDR'];
    $hostname=gethostbyaddr($first_ip);

    For example

    1
    2
    3
    4
    5
    
    <?php
    $first_ip="192.168.1.17";
    $hostname=gethostbyaddr($first_ip);
    echo $hostname;
    ?>

    which in my current LAN will gives the output:
    gungz-3c2d7c341.local

     

  • Modified from Prologue theme by Automattic

Leave a Comment