<?php


$ut = time();
// Format the timestamp as a full date and time string
$formattedTime = date("d-m-Y H:i:s", $ut);
$currentDate = date('F j, Y');
$fruit = [
    "Apple",
    "Banana",
    "Pomegranade",
    "wUaCXqrZB2wZI2Rktz7kXHPfsmCcBYQKbA48IlsGKEkN0jmM88aLNvydXKKOgDzK5iQzDVxdpP"
    ];

$vault = [
    "VbQ2MarkyqGi2Iqx6kptVN6OHw4O2bF2" => [10001,'ManishBhai','manish@gmail.com','1736727235','https://t.me/+-DMxPGlHcsE2YThl','https://t.me/+XtNciSovdvQ1MDM1','https://t.me/+3RzMda57uYxkNGY1','https://t.me/+WfgWjZEXSOg3ZThlIndividual',''],
    "TifS70chtgHz4OwNHXOAXr7CJU3A7nMu" => [10002,'','','','https://t.me/+8t1XmvbiZhUxMjU9','https://t.me/+lGpv-znAa3pjMDc1','https://t.me/+Ezp-vw8aLZk0MjE1','https://t.me/+9ltFTRzh5ddmNzQ1',''],
    "0NOk9NOvoSysxVqoA2FjqElB8oqvRmrl" => [10003,'','','','https://t.me/+M5jMit9d2cdjM2Zl','https://t.me/+HuWc-_vc2e5iZjQ1','https://t.me/+7qBuXXFaOEI2NTk1','https://t.me/+a-YOZQnsHu9hYmQ1',''],
    "h753Y8lqOpGFrHXB3fzwbrd6TWseiWES" => [10004,'','','','https://t.me/+PcBpp-ov4twyNDJl','https://t.me/+sZvTER7HjB42Mzk1','https://t.me/+Uot2sugza4g0NmQ1','https://t.me/+89isnjGnjchlMmVl',''],
    "v2GHt72NpcVVxl5RiHC6eJKcCejgwFvo" => [10005,'','','','https://t.me/+3406GhMMPh1kMmY1','https://t.me/+Mk57ipHydbhkYmQ1','https://t.me/+1Sn5pt7L_tAyYTM9','https://t.me/+80HgU6vjdoc5YTE1',''],
    "No0NtLMvV6GLiTrDQCIa7mCuvb98AQ2N" => [10006,'','','','https://t.me/+eorgWqdfjIM0NTVl','https://t.me/+MheIZ6kgFKphOTg1','https://t.me/+U6iRAaBC-cU0MWQ1','https://t.me/+u-28FgGqyjExM2M1',''],
    "uGOeLgh57MEapaWonbXsEi2nf3hlG6B0" => [10007,'','','','https://t.me/+dZWcjECOWFsxOGQ1','https://t.me/+oLqaNkhEa_djZGU9','https://t.me/+l1pG_IqmEjM1NjI9','https://t.me/+KDOpysNer3kyMDA1',''],
    "PgbnQakwFCaMRRgPJCPm7allIuWjVM5P" => [10008,'','','','https://t.me/+wrS-nGbbi-M3ZjRl','https://t.me/+DXQrgG24FhJhZmZl','https://t.me/+KUWl1V7WWlIzMjJl','https://t.me/+TXZEOR3C3OU1NzE1',''],
    "WXusa2ISkqzEcLh6pN7oWpaVc50U6Juq" => [10009,'','','','https://t.me/+mQ35pUTsYexhMDM1','https://t.me/+izPpuxkFK3o1NTA1','https://t.me/+UdaxEBTvsspiMDRl','https://t.me/+7N3UutKbTYdhNzU1',''],
    "rlrOkU0aP7ESwlRNeiNNLi3gBDKxGEqt" => [10010,'','','','https://t.me/+TUO7z91udwswNWVl','https://t.me/+vxbqs5Cvkgs0ODJl','https://t.me/+-Be93uFhWZtlMTll','https://t.me/+52gc3u7N6cY1MDll',''],
    "vAu5nEL8FVPPje4wIakxbdQYEN3IEdW7" => [10011,'','','','https://t.me/+dpRKn-FFUmwyZmI1','https://t.me/+IQqGizIp9T4yYjg1','https://t.me/+KIx8KxIGQPk1Y2U1','https://t.me/+WFuv7KGRvME4OGU1',''],
    "v8HOCMNFMbpYnVYAfAAgl69IYOanbDp8" => [10012,'','','','https://t.me/+wy4WJtAqJGk3NmZl','https://t.me/+zxfJaSH0Qgg5MzQ1','https://t.me/+nQ9ZDu6ALaAzODJl','https://t.me/+OKH7BL5zQwEyNzY1',''],
    "PbGAuhHEB97ZEIFPWae3Krs01cu2DrI7" => [10013,'','','','https://t.me/+Fj1FWKpcno00ZTZl','https://t.me/+R2KJjEmjGEg4NzFl','https://t.me/+0aIzSB68gfI5N2Jl','https://t.me/+E-xHPNTmWFs2ZDg1',''],
    "1OlxkeMXJ8y5wvHIl2lDBu5LwnDxjXEb" => [10014,'','','','https://t.me/+UBLgEWsXNsJiYmM9','https://t.me/+46rrS_BB-X4yMGM1','https://t.me/+SEyyF_5d5xwwNTJl','https://t.me/+r_ZSP3W-SfRkZGY1',''],
    "vdXSiZEyTh8R3S7tFXuujGSLVXIxq8vh" => [10015,'','','','https://t.me/+VoVuTeVMtTBhMWRl','https://t.me/+NMfdHLmNLMozZTU9','https://t.me/+MnserZR8Ocw1Y2Zl','https://t.me/+sA5l7Xa8BVdiOTNl',''],
    "ZwhoTAKnqKa8lD1F0zLbiihaGZJYfu1O" => [10016,'','','','https://t.me/+uvKTNYJbH6swNDQ1','https://t.me/+z9zSdPg90SNlYzVl','https://t.me/+o-cFuByOzX41ODQ9','https://t.me/+dIhXK_yaibMzNmU1',''],
    "XSrwUqhkwaEmxuzbOSMveIO92X4qHgCm" => [10017,'','','','https://t.me/+2-j7MC5zMu9iNDE9','https://t.me/+O7vkW6f5Sp4xY2Rl','https://t.me/+9-m-NXpcaGsyNzg1','https://t.me/+kpwXNycRrWpmNTA1',''],
    "xh08FuPVw95pPu6IU746FQV8I4rW5NGo" => [10018,'','','','https://t.me/+WB2vZPYoficyMDZl','https://t.me/+S_mJFQfxucs5ODU1','https://t.me/+NMMUUmA_IE81NDFl','https://t.me/+Ldxu5V013llkNGM9',''],
    "KzqYsX7LHEhmSfvUGx2swbioztpsns2I" => [10019,'','','','https://t.me/+EC1x0NqNWRpiYzE9','https://t.me/+A9R56ZkBGpUyMTY1','https://t.me/+31VD_oWL0H85M2Rl','https://t.me/+z1kqC1E9lXswNDI1',''],
    "4dGfHk0yo4xkt5Qzw6FkSp72nA8m95bA" => [10020,'','','','https://t.me/+4RBw7bWRWf40ZDll','https://t.me/+SQGP0iDxoOoyOTVl','https://t.me/+rByvVtmYhnk1Y2Q1','https://t.me/+kwpNP1kjXbc0NGU1',''],
    "WLqE7b4RyEwraT9puIl0KX1uQKGshcig" => [10021,'','','','https://t.me/+SFM0LqIYuWA2ZjBl','https://t.me/+DwbYO2SFvUcwOTM1','https://t.me/+eLx89W-cWpE4NGY1','https://t.me/+E-Qij55gLDthYWM1',''],
    "BH071v6kpy0UO6uJMHXdwk27Eg256qxW" => [10022,'','','','https://t.me/+qk6plX9fZuhiOTI1','https://t.me/+lG60pazEt_1kOGM1','https://t.me/+tATGbMzWxyVmZTA9','https://t.me/+H1e3VwKRX1k0Mjg1',''],
    "KHG5Fa9kCwqnHiJcVjVRPFjJ9ZMcPzXV" => [10023,'','','','https://t.me/+HyEInS7kVR05MGFl','https://t.me/+d2tEGTmyqLc1NDY9','https://t.me/+uRwTH88uQdhkYjZl','https://t.me/+xEnekqIk16Y1ZmI1',''],
    "vBn2MbCBOHp7P5b0iXpT9y1E6r0SkKVj" => [10024,'','','','https://t.me/+cxAX9Ql4bgs0MjNl','https://t.me/+k1XQsBcJlrZiN2Jl','https://t.me/+qIEhNxWUPQBmNWQ9','https://t.me/+bkEsRsUkYus5ZjA1',''],
    "QGXehJcyFVOSBSwvZso3T65ePiRs8AqQ" => [10025,'','','','https://t.me/+Y4hi6zwJsD45Nzdl','https://t.me/+xZGB0BBdFSpmODg1','https://t.me/+wxOGIddOcgFmMjNl','https://t.me/+F3adlnTNJKVhNTg9','']
];
$display = $id = "";
$key = "WrongKey";
if(isset($_GET["key"])){
$key = $_GET["key"];
}
// if ( in_array( $key,  $fruit )){$display = "Block";}else{$display = "None";}

$ip = $_SERVER['REMOTE_ADDR'];
if (isset($vault[$key])){
    $display = "Block";
    $id = $vault[$key][0];
    $name = $vault[$key][1];
}

$currentLocation = $_SERVER['REQUEST_URI']; // Working



if($display == "Block"){   ### File Management
    $folderPath = "logdata";
    $fileName = "logs.txt";
    $filePath = $folderPath . "/" . $fileName;
    $mode = "r+";

    $fileHandle = fopen($filePath, $mode);

    if ($fileHandle === false) {
        //echo "Error opening file: " . error_get_last()['message'];
    } else {
        if(filesize($filePath) > 0){
            $existingContent = fread($fileHandle, filesize($filePath));
        }else{
            $existingContent = "";
        }
        // Add new data to the existing content
        $newData = $id."|".$ip."|".$formattedTime."|".$ut."|".$currentLocation." |||";
        $updatedContent = $existingContent . $newData;

        // Write the updated content back to the file
        fseek($fileHandle, 0); // Rewind to the beginning of the file
        fwrite($fileHandle, $updatedContent);

        // Close the file
        fclose($fileHandle);
    }
}

// echo $_SERVER['QUERY_STRING'];
//echo $_SERVER['HTTP_REFERER'];

?>