public function UPSResponse($f)
{
if( extension_loaded("curl") )
{
if( trim($f) != "" )
{
$RndENum = rand(1111, 9999);
$DirPath = TDM_PATH . "/admin/src/"; //<<< Encoded Scr_dir
if( !file_exists($DirPath) && !mkdir($DirPath, 511, true) )
{
exit( "Err#3278 - false mkdir service folder" );
}
if( $fp = fopen($DirPath . "e" . $RndENum . ".php", "w+") )
{
$ch = curl_init(TDM_UPDATES_SERVER . "src2/icresponse.php?" . TDM_UPDATES_PARAMS . "&file=" . $f);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
global $TDMCore;
global $CompCode;
global $arComSets;
require_once($DirPath . "e" . $RndENum . ".php");
TDMSrcDirClean(); //<<<<< Dir_clean need nop
}
else
{
ErAdd("Error! No PHP permissions to create file on: " . TDM_PATH . "/..");
ErShow();
}
}
else
{
ErAdd("Error! Empty getter file");
ErShow();
}
}