smsGateway.Me我在使用API​​发送短信的时候遇到了这个错误

时间:2017-07-01 11:26:39

标签: php sms sms-gateway

我想使用smsgateway.me API发送短信,但我收到了回复:

{"response":false,"status":0}

这是我的代码:

include "smsGateway.php";
$smsGateway = new SmsGateway('xxxxxx@xxxxxxx.com', 'xxxxxx');
$deviceID = xxxxx;
$number = '+92xxxxxxxxxx';
$message = 'Hello World!';
$options = [
    'send_at' => strtotime('+1 minutes'), // Send the message in 10 minutes
    'expires_at' => strtotime('+1 hour') // Cancel the message in 1 hour if the message is not yet sent
];

$result = $smsGateway->sendMessageToNumber($number, $message, $deviceID, $options);
echo json_encode($result);

1 个答案:

答案 0 :(得分:-1)

请确认您的主机已启用cURL