"https://api.ipregistry.co/".$clientIp."?key=".$apikey."&key=tryout", CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 10, CURLOPT_CUSTOMREQUEST => "GET", )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if($err){ return false; }else{ $ipinfo = json_decode($response, true); $countryCode = $ipinfo['location']['country']['code']; $isvpn = $ipinfo['security']['is_vpn'] == false ? "not" : "yes"; $isproxy = $ipinfo['security']['is_proxy'] == false ? "not" : "yes"; $istor = $ipinfo['security']['is_tor'] == false ? "not" : "yes"; if($countryCode == 'ID'){ if($isvpn == 'yes' || $isproxy == 'yes' || $istor == 'yes'){ return false; }else{ return true; } }else{ return false; } } } //$clientIp = '103.148.192.76'; // untuk testing $clientIp = $_SERVER['REMOTE_ADDR']; // untuk live hosting if(checkIP($clientIp) == false){ header('Location: https://1win.com/'); // Redirect jika IP bukan dari ID atau pakai VPN exit; }else{ // IP valid => tampilkan pesan & link daftar echo 'IP dari Indonesia dan tidak pakai VPN.
'; // Link daftar $links = [ 'https://lituhayu.88omegabet.me/register?ref=M1700781659', 'https://lituhayu.88omegabet.me/register?ref=M1700781659' ]; // Tampilkan semua link daftar foreach($links as $link){ echo 'Klik untuk daftar: '.$link.'
'; } } ?>