Exemple #1
0
 function __construct($account, $passwd, $type = 1)
 {
     $this->account = $account;
     $this->passwd = $passwd;
     if (!class_exists("SoapClient")) {
         die("请开启Soap扩展");
         exit;
     }
     if (self::$single == null) {
         self::$single = new SoapClient($this->url);
     }
 }
 public function send_phone_sms($mobiles = '', $tar_content = '')
 {
     global $basic_config;
     if ($basic_config['sms_interface'] != 'open') {
         return false;
     }
     if (!SMS_ACCOUNT || !SMS_PASSWD) {
         return false;
     }
     !$mobiles and $mobiles = $this->_mobile;
     !$tar_content and $tar_content = $this->_mobile_content;
     $tar_content = strip_tags(htmlspecialchars_decode($tar_content));
     $xwSms = new XuanWuSms(SMS_ACCOUNT, SMS_PASSWD);
     if (strtoupper(CHARSET) == 'GBK') {
         $tar_content = kekezu::gbktoutf($tar_content);
     }
     return $xwSms->_postSingle($mobiles, $tar_content);
 }
 public function send_phone_sms($mobiles = '', $tar_content = '')
 {
     global $basic_config;
     if ($basic_config['sms_interface'] != 'open') {
         return false;
     }
     if (!SMS_ACCOUNT || !SMS_PASSWD) {
         return false;
     }
     !$mobiles and $mobiles = $this->_mobile;
     !$tar_content and $tar_content = $this->_mobile_content;
     $xwSms = new XuanWuSms(SMS_ACCOUNT, SMS_PASSWD);
     return $xwSms->_postSingle($mobiles, $tar_content);
 }