public function actionUc($code) { //$this->enableCsrfValidation = false; $get = $post = []; defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc()); parse_str(_authcode($code, 'DECODE', $this->module->uc_key), $get); //var_dump($get['time']);exit; Yii::trace($get); if (MAGIC_QUOTES_GPC) { $get = _stripslashes($get); } $timestamp = time(); /*if($timestamp - $get['time'] > 3600) { exit('Authracation has expiried'); }*/ if (empty($get)) { exit('Invalid Request'); } $postStr = Yii::$app->request->rawBody; /*if (get_magic_quotes_runtime()) { $postStr = stripslashes($postStr); }*/ $post = Xml::xml_unserialize($postStr); Yii::trace($post); if (empty($get['action'])) { return 1; } if (in_array($get['action'], array('test', 'deleteuser', 'renameuser', 'gettag', 'synlogin', 'synlogout', 'updatepw', 'updatebadwords', 'updatehosts', 'updateapps', 'updateclient', 'updatecredit', 'getcreditsettings', 'updatecreditsettings'))) { $ucReceiver = new UcReceiver(['get' => $get, 'post' => $post]); return $ucReceiver->response(); } return UcReceiver::API_RETURN_FAILED; }