適用產業:金融、工商、稅務、電力、貿易、商業、旅遊、政府、郵政、教育等行業 適用類型:掛接各種B/S系統,作為各類辦公系統、ERP、CRM、電子商務平台的插件(如群發短信會議通知、會員/客戶關係交流、訂單生成通知、發貨通知、日程提醒、催費通知等等) 特點: 綠色短信,合法正規通道,全網收發 支援移動、聯通、電信、網通短信,雙向互動,可回復高速群發 免費帳號申請(請註明來自"商脈無限短信介面",贈送50條短信,測試短信不夠用的話再聯繫我) * 短信接口文件: /*------------ -------------------- 功能: 商脈無限PHP HTTP介面發送簡訊 修改日期: 2011-04-08 說明: http ://http.smsdk.com/tx/?uid=用戶帳號&pwd=MD5位元32密碼&mobile=號碼&content=內容 狀態: 100 傳送成功 101 驗證失敗 102 簡訊不足 103 操作失敗 104 非法字元 105 內容過多 106 號碼過多 107 頻率過快 108 號碼內容。 110 禁止頻繁單一發送 111 系統暫定發送 112 號碼不正確 120 系統升級 --------------------- -----------*/ $uid = '9999'; //使用者帳號 $pwd = '9999'; //密碼 $mobile = '13912341234,13312341234 ,13512341234,02122334444'; //號碼 $content = '商脈無限PHP HTTP介面'; //內容 //即時傳送 $res = sendSMS($uid,$pwd,$mobile ,$content); echo $res;
//定時發送 /* $time = '2010-05-27 12:11'; $res = sendSMS($uid,$pwd,$mobile,$ content,$time); echo $res; */ function sendSMS($uid,$pwd,$mobile,$content,$time='',$mid='') { $http = 'http://http.c123.com/tx/'; $data = array ( 'uid'=>$uid, //使用者帳號 'pwd'=>strtolower(md5($pwd)), //MD5位元32密碼 'mobile'=>$mobile, //號碼 'content'=>$content, //內容 'time'=>$time, //定時發送 'mid'=>$mid //子擴展號 ); $re= postSMS($http,$data); //POST方式提交 if( trim($re) == '100' ) { return "發送成功!"; } else { return "傳送失敗! 狀態:".$re; } }
function postSMS($url,$data='') { $row = parse_url($url); $host = $row['host']; $port = $row['port'] ? $row['port']:80; $file = $row['path']; while (list($k,$v) = each($data)) { $post .= rawurlencode($k)."=".rawurlencode($v)."&"; //轉URL標準碼 } $post = substr( $post , 0 , -1 ); $len = strlen($post); $fp = @fsockopen( $host ,$port, $errno, $errstr, 10); if (!$fp) { return "$errstr ($errno)n"; } else { $receive = ''; $out = "POST $file HTTP /1.1rn"; $out .= "Host: $hostrn"; $out .= "Content-type: application/x-www-form-urlencodedrn"; $out .= " Connection: Closern"; $out .= "Content-Length: $lenrnrn"; $out .= $post; fwrite($fp, $out); while (!feof ($fp)) { $receive .= fgets($fp, 128); } fclose($fp); $receive = explode("rnrn",$receive); unset($receive[0]); return implode("",$receive); } } ?> 詳細介紹:http://www. smsdk.com/a/gb2312/news/20111205/117.html
- * 簡訊介面檔:
-
- /*----------------------- ---------
- 功能: 商脈無限PHP HTTP介面發送簡訊
- 修改日期: 2011-04-08
- 說明: http://http.smsdk.com/tx/ ?uid=用戶帳號&pwd=MD5位元32密碼&mobile=號碼&content=內容
- 狀態:
- 100 傳送成功
- 101 驗證失敗
- 102 簡訊不足
- 103 操作失敗
- 102 簡訊不足
- 103 操作失敗
- 非法字元
- 105 內容過多
- 106 號碼過多
- 107 頻率過快
- 108 號碼內容空
- 109 帳號凍結
- 110 禁止頻繁單一系統發送 112 號碼不正確
- 120 系統升級
- -------------------------------- */
- $uid = '9999'; //用戶帳號
- $pwd = '9999'; //密碼
- $mobile = '13912341234,13312341234,1351234號123,004,14434 >$content = '商脈無限PHP HTTP介面'; //內容
- //即時傳送
- $res = sendSMS($uid,$pwd,$mobile,$content);
- echo $res ;
-
- //定時發送
- /*
- $time = '2010-05-27 12:11';
- $res = sendSMS($uid,$pwd,$mobile, $content,$time);
- echo $res;
- */
- function sendSMS($uid,$pwd,$mobile,$content,$time='',$mid='')
- {
- $http = 'http://http.c123.com/tx/';
- $data = array
- (
- 'uid'=>$uid, //使用者帳號
- 'pwd'=>strtolower(md5($pwd)), //MD5位元32密碼
- 'mobile'=>$mobile, //號碼
- 'content'=>$content, //內容
- 'time'=>$time, //定時發送
- 'mid'=>$mid //子擴展號
- );
- $re= postSMS($http,$data) ; //POST方式提交
- if( trim($re) == '100' )
- {
- return "發送成功!";
- }
- else
- {
- {
- return "傳送失敗! 狀態:".$re;
- }
- }
-
- function postSMS($url,$data='')
- {
- $row = parse_url ($url);
- $host = $row['host'];
- $port = $row['port'] ? $row['port']:80;
- $file = $ row['path'];
- while (list($k,$v) = each($data))
- {
- $post .= rawurlencode($k)."=".rawurlencode( $v)."&"; //轉URL標準碼
- }
- $post = substr( $post , 0 , -1 );
- $len = strlen($post);
- $fp = @fsockopen( $host ,$port, $errno, $errstr, 10);
- if (!$fp) {
- return "$errstr ($errno)n";
- } else {
- $receive = '';
- $out = "POST $file HTTP/1.1rn";
- $out .= "Host: $hostrn";
- $out .= "Content- type: application/x-www-form-urlencodedrn";
- $out .= "Connection: Closern";
- $out .= "Content-Length: $lenrnrn";
- $out .= $ post;
- fwrite($fp, $out);
- while (!feof($fp)) {
- $receive .= fgets($fp, 128);
- }
- fclose ($fp);
- $receive = explode("rnrn",$receive);
- unset($receive[0]);
- return implode("",$receive);
- }
- }
- ?>
- 詳細介紹:http://www.smsdk.com/a/gb2312/news/20111205/117.html
-
|