function CCurlKey($url, $data) { $urlheadar = explode(':', $url); if (!isset($urlheadar[1])) { $url = 'http://' . $url; $urlhead = 'http'; } else { $urlhead = $urlheadar[0]; } switch ($urlhead) { case 'http': $doc = 1; break; case 'https': $doc = 2; break; default: $doc = 1; $url = 'http://' . $url; break; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); if ($doc == 2) { curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); } $returnc = curl_exec($ch); curl_close($ch); $returnc = GjieA($returnc, 'BTSuser:'******':BTsuserover'); return trim($return); }
$liuser = $_GET["BTSnowBallUsername"]; } elseif (isset($_POST["BTSnowBallUsername"])) { $liuser = $_POST["BTSnowBallUsername"]; } else { exit; } if ($liuser == "") { exit; } $MyUser = 0; if (!strstr($liuser, "@@")) { $liuser = $liuser . $SDomain; //若为本站用户,直接切为本站登录。 $MyUser = 1; } $lidomain = GjieA($liuser, '@@', 2); $lidun = GjieB($liuser, '@@', 0); if ($lidun == "" or $lidomain == "") { $tmod = 'BUError'; $btsuerrormsg = 'EMPTY!BTS Connect Error!(Veson BTSU 1.0)'; include 'intem.php'; exit; } $IfCanC = IFRTSet($lidun, $lidomain); if ($IfCanC['in'] != '1') { $tmod = 'BUError'; $btsuerrormsg = 'ERROR!该用户名被禁止登入或处于停用状态!'; include 'intem.php'; exit; } unset($IfCanC);