Пример #1
0
	function Report2Server($arServerReport)
	{
		$strError_tmp = "";

		if (!is_array($arServerReport) || count($arServerReport)<=0)
		{
			$strError_tmp .= "[UR2S01] Empty report.<br>";
		}

		if (strlen($strError_tmp)<=0)
		{
			$GLOBALS["DB"]->GetVersion();

			$strVars = "LICENSE_KEY=".urlencode(md5(CUpdateSystem::GetLicenseKey())).
				"&CLIENT_SITE=".urlencode($_SERVER["SERVER_NAME"]).
				"&CLIENT_PHPVER=".urlencode(phpversion()).
				"&SUPD_DBS=".urlencode($GLOBALS["DB"]->type).
				"&XE=".urlencode(($GLOBALS["DB"]->XE) ? "Y" : "N").
				"&CANGZIP=".urlencode((CUpdateSystem::IsGzipInstalled()) ? "Y" : "N");

			foreach ($arServerReport as $key => $value)
			{
				if (strlen($strVars)>0)
					$strVars .= "&";

				$strVars .= "bitm_".$key."=".urlencode($value[0]."!".$value[1]);
			}
		}

		if (strlen($strError_tmp)<=0)
		{
			$content = CUpdateSystem::getHTTPPage("bit_sysreport.php", $strVars, $strError_tmp);

			if (strlen($content)<=0)
				$strError_tmp .= "[UR2S03] Empty server response.<br>";
		}
	}