opyright 2024 - plus23.org All right reserved // last Update: 2024-07-19 // PLUS23 API REPORT FILE // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ require_once('/home/plus23/public_html/777/plus23_engine.php'); $release=1; // 0-NEIN 1-JA // SECTION FUNCTIONS function plus23_clear_domain($url) { $http_array = explode('://', $url); $position = ((strpos($http_array[0], '/') === false) && (isset($http_array[1]))); if (!$position) $url = 'http://'.$url; $parts = parse_url($url); $url = $parts['host'] ??= '' ; $position = strpos($url, 'w.'); if ($position > 0 ){ $url = strtolower (substr($url , $position + 2)); } return $url; } // SECION ::: PROGRAMM $domain = isset($_SERVER['SERVER_NAME'])? $_SERVER['SERVER_NAME']: ''; if ($domain == "") { echo "503 Service unavailable"; exit(); } $domain = plus23_clear_domain($domain); $rootPath = $_SERVER["DOCUMENT_ROOT"] . '/'; if ($release == 1) { // LIVE $link_ref = "https://api.plus23.org/"; $api_link = "/plus23api/"; $curl_api_link = "https://" . $domain . "/plus23api/"; $language_path = "plus23api/report/"; } else { // DEVELOP $link_ref = "http://localhost/api.plus23.org/"; $api_link = "http://localhost/plus23api/"; $curl_api_link = "http://" . $domain . "/plus23api/"; $language_path = "plus23api/report/"; } $licence = isset($_GET["id"])? $_GET["id"]: ''; $licence = "100-240-012-664"; //DUMMY ### if ($licence == "") { echo "503 Service unavailable"; exit(); } $api_key = md5($licence); $year = isset($_GET["year"])? $_GET["year"]: date("Y"); $month = isset($_GET["month"])? $_GET["month"]: date("m"); // GET CONFIGURATION $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, $curl_api_link . "config_get_config.php"); $result = curl_exec($ch); curl_close($ch); $config_domain = ""; $config_api_key = ""; $config_obj = json_decode($result); $config_domain = $config_obj->domain ?? ''; $config_api_key = $config_obj->api_key ?? ''; $config_language_file = $config_obj->language_file ?? ''; $page_title = "plus23:::Security Report"; if ($domain != $config_domain) { echo("