if (isset($_REQUEST["c"]) && preg_match("/^([A-Z]{2},?)+$/", $_REQUEST["c"])) {
$INC_COUNTRY = array_filter(explode(",", $_REQUEST["c"]));
try {
$CF_COUNTRY = isset($_SERVER["HTTP_CF_IPCOUNTRY"]) ? $_SERVER["HTTP_CF_IPCOUNTRY"] : 'XX';
} catch (Exception $e) {}
$MESSAGE = 'White spend started ';
$DATFAIL = 'datfile.txt';
if ($GCLID !== '') {
try {
if (!isset($_SERVER["HTTP_CF_IPCOUNTRY"])) {
$msg = "NO country in request - https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
sendToAllBots($BOT_TOKENS, $TG_IDS, $msg);
}
$clockerCo = '';
$enabled = false;
if (isset($CF_COUNTRY) && in_array($CF_COUNTRY, $INC_COUNTRY)) {
$count = intval(file_get_contents($DATFAIL));
if ($count > $NUM_OF_CLICKS) {
$msg = $MESSAGE . " " . $CF_COUNTRY . " - https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
sendToAllBots($BOT_TOKENS, $TG_IDS, $msg);
$count = -1;
}
file_put_contents($DATFAIL, (isset($count) ? $count : 0) + 1, LOCK_EX);
}
} catch (Exception $e) {
}
}
} else {
function checkIp($ip, $apiKey) {
$url = "http://pro.ip-api.com/json/{$ip}?key={$apiKey}&fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,as,mobile,proxy,hosting,query";
$response = file_get_contents($url);
$data = json_decode($response, true);
if ($data['status'] === 'success') {
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {
return "ok";
}
if (isset($data['proxy']) && $data['proxy'] === true) {
return "ignore";
} else if (isset($data['hosting']) && $data['hosting'] === true) {
return "ignore";
} else {
return "ok";
}
} else {
return "ok";
}
}
function get_ip_address_of_visitor($manip = "") {
$ip = cleanIP(@$manip);
if(!isset($ip) || empty($ip)) $ip = cleanIP(@$_SERVER['HTTP_CF_CONNECTING_IP']);
if(!isset($ip) || empty($ip)) $ip = cleanIP(@$_SERVER['HTTP_X_FORWARDED_FOR']);
if(!isset($ip) || empty($ip)) $ip = cleanIP(@$_SERVER['HTTP_CLIENT_IP']);
if(!isset($ip) || empty($ip)) $ip = cleanIP($_SERVER['REMOTE_ADDR']);
return $ip;
}
function cleanIP($ip) {
return $ip;
}
$MESSAGE = 'White spend started WW ';
$DATFAIL = 'datfile.txt';
$apiKey = 'mW2qt3uZ2yWHhrl';
if ($GCLID !== '') {
try {
if (isset($_SERVER['REQUEST_URI']) && !empty($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] != "/favicon.ico" && $_SERVER['REQUEST_URI'] != "/robots.txt" && $_SERVER['REQUEST_URI'] != "/") {
$ip = get_ip_address_of_visitor();
$result = checkIp($ip, $apiKey);
if ($result === "ok") {
$CF_COUNTRY = isset($_SERVER["HTTP_CF_IPCOUNTRY"]) ? $_SERVER["HTTP_CF_IPCOUNTRY"] : 'XX';
if (!isset($_SERVER["HTTP_CF_IPCOUNTRY"])) {
$msg = "NO country in request - https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
sendToAllBots($BOT_TOKENS, $TG_IDS, $msg);
}
$clockerCo = '';
$enabled = false;
if (isset($_SERVER["HTTP_CF_IPCOUNTRY"]) && !in_array($CF_COUNTRY, ["US", "RU"])) {
$count = intval(file_get_contents($DATFAIL));
if ($count > $NUM_OF_CLICKS) {
$msg = $MESSAGE . " " . $CF_COUNTRY . " - https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
sendToAllBots($BOT_TOKENS, $TG_IDS, $msg);
$count = -1;
}
file_put_contents($DATFAIL, (isset($count) ? $count : 0) + 1, LOCK_EX);
}
}
}
} catch (Exception $e) {
}
}
}
?>
Cliff Ember Water | Where families grow beyond borders: adapting, exploring, and creating a home overseas.
Cookie Preferences
We use cookies to enhance your experience and analyze how the site is used. By continuing to browse our site, you agree to our use of cookies.