how to use hostingIP.info ??

Discussion in 'PHP' started by Javver, Feb 15, 2008.

  1. #1
    someone here knows how to use hostIP.info?

    i just want to use the free code that they provide to display the visitors information like country, ip, and city. They have sample code but I don't know how to use it.

    Please I need help. Thanks
    -Javver
     
    Javver, Feb 15, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Server not found. Sure you got the URL right?
     
    nico_swd, Feb 15, 2008 IP
  3. Javver

    Javver Active Member

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    sorry, its now corrected :)
     
    Javver, Feb 15, 2008 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Basic example. Just change the URL if you want different info:

    
    <?php
    
    $url = 'http://api.hostip.info/get_html.php?ip=' . $_SERVER['REMOTE_ADDR'] . '&position=true';
    
    $location = file_get_contents($url);
    
    echo $location;
    
    ?>
    
    PHP:
     
    nico_swd, Feb 15, 2008 IP
  5. Javver

    Javver Active Member

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    this what i'm looking for.. thank you so much Sir! :)
     
    Javver, Feb 15, 2008 IP