<?php
$mysender2= "";
$myrecepient2= "923336088811,923126812536,923134126153";
$mymessage2 = "this is message";
$api_key = "****";
$api_secret="****";
$to_arr = explode(",", $myrecepient2);
foreach ($to_arr as $b){
$url = "https://rest.nexmo.com/sms/json?" .
"api_key=".$api_key. "&" .
"api_secret=" .$api_secret . "&" .
"from=" . urlencode($mysender2) . "&" .
"to=" . urlencode($b) . "&" .
"text=" .urlencode($mymessage2);
$c = curl_init($url);
// Use SSL
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);
$html = curl_exec($c);
curl_close ($c);
}
?>
上述脚本将一次又一次地运行,直到该过程完成。如何在流程完成时显示回显 .. 例如“您的流程已完成”