接口合作公司 :http://sms.inolink.com/LoginFront.aspx 从这里获取id
<?php
function execPostRequest($url,$fields){ if(empty($url)){ return false;}//$fields_string =http_build_query($post_array);foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }rtrim($fields_string,'&');$ch = curl_init();curl_setopt($ch,CURLOPT_URL,$url);curl_setopt($ch,CURLOPT_POST,count($fields));curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);$result = curl_exec($ch);curl_close($ch);return $result; } //短信接口username $uid $uid = 'tclkj02234'; //短信接口password $passwd $passwd = '731765'; //发送到的目标手机号码 $telphone $telphone = '1863525****'; //短信内容 $message $message = "这是一条測试信息111111【XX】"; $fields = array('CorpID'=>urlencode($uid),'Pwd'=>urlencode($passwd),'Mobile'=>urlencode($telphone),'Content'=>urlencode($message),'Cell'=>'','SendTime'=>'' ); $url = "http://inolink.com/WS/BatchSend.aspx"; $result = execPostRequest($url,$fields); if(0== $result) { echo "发送成功! 发送时间".date("Y-m-d H:i:s"); } else { echo "发送失败, 错误提示代码: ".$result; } ?>