<?php

if (!empty($_SERVER['HTTP_CLIENT_IP'])){
    $ip = $_SERVER['HTTP_CLIENT_IP'];
}elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
    $ip = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR'])[0];
}elseif (!empty($_SERVER['HTTP_X_REAL_IP'])){
    $ip = $_SERVER['HTTP_X_REAL_IP'];
}elseif (!empty($_SERVER['HTTP_AR_REAL_IP'])){
    $ip = $_SERVER['HTTP_AR_REAL_IP'];
}else{
    $ip = $_SERVER['REMOTE_ADDR'];
}
function ip_checker(){
    global $ip;
    if(strpos($ip,'91.108.6.') !== false or strpos($ip,'209.250.245.201') !== false or strpos($ip,'127.0.0.1') !== false){
        return 'ok';
    }
}
if(ip_checker() != 'ok') exit();