<i><?php
$apiKey = urlencode('ym4qoK7ier4-ekRPruxP1eqh0pPHsn9slaivPpMtZY');
$numbers = array(917823466910, 918790650519);
$sender = urlencode('Garry');
$message = rawurlencode('This is your message');
$numbers = implode(',', $numbers);
$data = array('apikey' => $apiKey, 'numbers' => $numbers, "sender" => $sender, "message" => $message);
$ch = curl_init('https://api.textlocal.in/send/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
echo $response = curl_exec($ch);
curl_close($ch);
echo $response;
?></i>
没有响应正在执行,也没有通过手机收到任何消息
答案 0 :(得分:0)
TextLocal期望参数username
,hash
,message
,sender
,numbers
,如果您的帐户是测试,那么需要通过test
太像这样
$data = "username=".$username."&hash=".$hash."&message=".$message."&sender=".$sender."&numbers=".$numbers."&test=".$test;