$ip = $_SERVER["REMOTE_ADDR"] // Visitor IP Address;
$api_key = 'YOUR_API_KEY';
$url = "https://api.trustip.io/v1/check.php?key={$api_key}&ip={$ip}";
$json = file_get_contents($url);
$response = json_decode($json, true);
if($response['status'] == 'success'){
if($response['data']['is_proxy']) {
echo 'IP address is a proxy';
} else {
echo 'IP address is not a proxy';
}
} else {
die($response['message']);
}
$ip = $_SERVER["REMOTE_ADDR"] // Visitor IP Address;
$api_key = 'YOUR_API_KEY';
$url = "https://api.trustip.io/v1/check.php?key={$api_key}&ip={$ip}";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
$response = json_decode($result, true);
if($response['status'] == 'success'){
if($response['data']['is_proxy']) {
echo 'IP address is a proxy';
} else {
echo 'IP address is not a proxy';
}
} else {
die($response['message']);
}