Aggregated SMS believe that everyone has done, the online code to see the next is too cumbersome, but the online is relatively good, with the Post method, more secure, because our project is on the server request, and bound the white list, so get a simple point of their own use, refer to the following:
<?PHP
$name= "Mr. Zhang";$mobile= "189000000098";$appkey= "A7LK8Y949045699499F07586C";$code= "9999";$tpvalue=UrlEncode("#name #=".$name." & #code #= ".$code);//$url = "http://v.juhe.cn/sms/send?mobile=". $mobile. " &tpl_id=48717&tpl_value=%23name%23%3d ". $name." &key= ". $appkey;$url= "http://v.juhe.cn/sms/send?mobile=".$mobile." &tpl_id=19717&tpl_value= ".$tpvalue." &key= ".$appkey;$content= Sendsms ($url);Var_dump($content);Exit;functionSendsms ($url){ $curl=Curl_init (); curl_setopt ($curl, Curlopt_url,$url); curl_setopt ($curl, curlopt_header,0); curl_setopt ($curl, curlopt_returntransfer,1); $data= Curl_exec ($curl); return $data; Curl_close ();}
When using the variable with the parameter value can be returned to the JSON format, self-processing can be, a simple parameter, two parameters will be the transcoding process of attention to the point is good.
Aggregate SMS PHP code sample SMS Interface Call Curl method