Exemplo n.º 1
0
 /**
  * 模拟post提交
  * @author wjh
  * @param $url
  * @param array $data
  * @param string $returnType json or string ,default json
  * @return string
  */
 public static function curl_post_sessionid($url = null, $data = array())
 {
     if (empty($url)) {
         $url = BDataHelper::getHltConfig('api') . "/j_spring_security_token_check?u=admin";
     }
     $result = self::curl_post($url, $data, 'string', 1);
     preg_match('/Set-Cookie:(.*);/iU', $result, $str);
     $sessionid = !empty($str) && count($str) > 1 ? trim($str[1]) : '';
     return $sessionid;
 }
Exemplo n.º 2
0
 /**
  * 获取HTL团渠道
  * @param $gid
  * @return string
  */
 public static function hltChanid($gid)
 {
     $bool = GroupService::hltProvider_exists($gid);
     $chanid = BDataHelper::getHltConfig('chanid');
     if ($bool) {
         $chanid = BDataHelper::getHltConfig('menshisystem');
     }
     return $chanid;
 }