= "5.1") : date_default_timezone_set('Europe/Berlin'); endif; // ***************************************************************************** include_once ("htmlMimeMail.php"); function getHttpVars($httpVars) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $retArr = array(); foreach($httpVars as $hVar) $retArr[] = (isset($HTTP_GET_VARS[$hVar])) ? $HTTP_GET_VARS[$hVar] : ((isset($HTTP_POST_VARS[$hVar])) ? $HTTP_POST_VARS[$hVar] : ""); return $retArr; } // Gets all script-parameters (HTTP_GET_VARS and HTTP_POST_VARS). // If "$mode == 1" then all id-parameters (only these!) will be decoded function getSecHttpVars($getSecHttpVarsMode = "0", $httpVars) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $retArr = getHttpVars($httpVars); $i = 0; foreach ($httpVars as $par) { global $$par; $$par = $retArr[$i]; $i++; } // Decryption of the fields if encrypted if ($getSecHttpVarsMode == "1") : foreach ($httpVars as $par) { $$par = dc($$par); } endif; return $retArr; } // Writes a string to a file optional with or without linefeed function writeToFile($fileName, $stringToOperate, $mode = 'a', $noLf = "") { $fileHandle = fopen($fileName, $mode); if ($noLf == "") : $stringToOperate .= "\n"; endif; $opCode = fwrite($fileHandle, $stringToOperate); fclose($fileHandle); return $opCode; } // ***************************************************************************** getSecHttpVars("0", array("auth", "imei", "crashdumpdata")); if ($auth == "comegetsomexxxx9753" && $imei != "" && $crashdumpdata != "") : // Decode BASE64 $crashdumpdata = base64_decode($crashdumpdata); // Uncompress $crashdumpdata = gzinflate(substr($crashdumpdata,10,-8)); // Current timestamp $currentTime = date("Y-m-d H:i:s"); // calling client IP $currentClientIP = trim($_SERVER['REMOTE_ADDR']); // Append to log file writeToFile($imei . ".log", $currentTime . " | " . $currentClientIP); writeToFile($imei . ".log", $crashdumpdata); writeToFile($imei . ".log", "-------------------------------------------------------------------------------------"); // Send mail to admin@assecutor.de $mailObj = new htmlMimeMail(); $mailtext = "
<>"; $mailtext .= ""; $mailtext .= "