用于未给出响应的sms的Php curl api

用于未给出响应的sms的Php curl api,php,curl,Php,Curl,响应没有执行,我也没有在手机上收到任何消息,如果您的帐户被测试,那么也需要通过测试 <i><?php $apiKey = urlencode('ym4qoK7ier4-ekRPruxP1eqh0pPHsn9slaivPpMtZY'); $numbers = array(917823466910, 918790650519); $sender = urlencode('Garry'); $message = rawurlencode('This i

响应没有执行,我也没有在手机上收到任何消息,如果您的帐户被测试,那么也需要通过测试

<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>

你可以试着通过表格发送,看看是否有效。它可能是第三方。我想问为什么这不起作用…Curl回答true或false..在这种情况下,没有任何东西起作用。不确定APIkey是否有效,但运行该代码返回<代码>{“错误”:[{“代码”:3,“消息”:“无效登录详细信息”}],“状态”:“失败”}运行代码返回显示:-{“错误”:[{“代码”:3,“消息”:“无效的登录详细信息”}],“状态”:“失败”}1参数无效。现在明白了。谢谢帮助。。
$data = "username=".$username."&hash=".$hash."&message=".$message."&sender=".$sender."&numbers=".$numbers."&test=".$test;