Ejemplo n.º 1
0
 public static function getDefaultDomainUrl($useSSL)
 {
     $urlStr = GTConfig::getProperty("gexin_default_domainurl", null);
     if ($urlStr == null || "" == trim($urlStr)) {
         if ($useSSL) {
             $hosts = array("https://cncapi.getui.com/serviceex", "https://telapi.getui.com/serviceex", "https://api.getui.com/serviceex", "https://sdk1api.getui.com/serviceex", "https://sdk2api.getui.com/serviceex", "https://sdk3api.getui.com/serviceex");
         } else {
             $hosts = array("http://sdk.open.api.igexin.com/serviceex", "http://sdk.open.api.gepush.com/serviceex", "http://sdk.open.api.getui.net/serviceex", "http://sdk1.open.api.igexin.com/serviceex", "http://sdk2.open.api.igexin.com/serviceex", "http://sdk3.open.api.igexin.com/serviceex");
         }
     } else {
         $list = explode(",", $urlStr);
         $hosts = array();
         foreach ($list as $value) {
             if (strpos($value, "https://") === 0 && !$useSSL) {
                 continue;
             }
             if (strpos($value, "http://") === 0 && $useSSL) {
                 continue;
             }
             if ($useSSL && strpos($value, "http") != 0) {
                 $value = "https://" . $value;
             }
             array_push($hosts, $value);
         }
     }
     return $hosts;
 }
Ejemplo n.º 2
0
 public static function getDefaultDomainUrl()
 {
     $urlStr = GTConfig::getProperty("gexin_default_domainurl", null);
     if ($urlStr == null || "" . equals(trim($urlStr))) {
         $hosts = array("http://sdk.open.api.igexin.com/serviceex", "http://sdk.open.api.gepush.com/serviceex", "http://sdk.open.api.getui.net/serviceex");
         for ($i = 0; $i < 3; $i++) {
             array_push($hosts, "http://sdk" . $i . ".open.api.igexin.com/serviceex");
         }
         return $hosts;
     }
     return explode(",", $urlStr);
 }
Ejemplo n.º 3
0
 /**
  * @return array
  */
 public static function getDefaultDomainUrl()
 {
     $urlStr = GTConfig::getProperty('gexin_default_domainurl', null);
     if ($urlStr === null || '' === trim($urlStr)) {
         $hosts = array('http://sdk.open.api.igexin.com/serviceex', 'http://sdk.open.api.gepush.com/serviceex', 'http://sdk.open.api.getui.net/serviceex');
         for ($i = 0; $i < 3; $i++) {
             $hosts[] = 'http://sdk' . $i . '.open.api.igexin.com/serviceex';
         }
         return $hosts;
     }
     return explode(',', $urlStr);
 }