1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[Share] Find Your IP & Domain Info

Discussion in 'Pemrograman Web' started by benpinter, Jan 24, 2021.

Tags:
  1. benpinter

    benpinter Super Hero

    Joined:
    Dec 28, 2009
    Messages:
    817
    Likes Received:
    78
    Location:
    dihatimu :p
    lumayan buat yang mau belajar agc bisa dicoba :D

    find your ip info:

    php code:
    Code:
    <?php
    $myip=$_SERVER['REMOTE_ADDR'];
    $string = file_get_contents("https://get.apigeoip.com/json/".$myip);
    $json_a = json_decode($string,true);
    echo '<table>';
    foreach ($json_a as $key => $value){
      echo  '<tr><td>'.$key . '</td><td> : ' . $value.'</td></tr>';
    }
    echo '</table>';
    ?>
    demo: apigeoip.com/myip.php

    find domain ip info:

    php code:
    Code:
    <?php
    $getdomain=$_GET['domain'];
    $domainip=gethostbyname($getdomain);
    $string = file_get_contents("https://get.apigeoip.com/json/".$domainip);
    $json_a = json_decode($string,true);
    echo '<table>';
    foreach ($json_a as $key => $value){
      echo  '<tr><td>'.$key . '</td><td> : ' . $value.'</td></tr>';
    }
    echo '</table>';
    ?>
    dont forget to add ?domain=domainname.com

    demo: apigeoip.com/domain.php?domain=ads.id

    semoga bermanfaat [​IMG]
     
    xrvel likes this.
  2. belajarmenulis

    belajarmenulis Hero

    Joined:
    Jan 5, 2020
    Messages:
    669
    Likes Received:
    157
    Location:
    Google
    Semangat AGC
     
  3. newbiefans

    newbiefans Super Hero

    Joined:
    Sep 5, 2009
    Messages:
    2,087
    Likes Received:
    365
    Location:
    DKI JAKARTA
    thnaks for share hu
     
  4. emzeth

    emzeth jangan terlalu serius

    Joined:
    Jan 10, 2012
    Messages:
    116
    Likes Received:
    46
    Location:
    Bandung - Jakarta
    Pm hu, kebetulan punya apps ip juga
     

Share This Page