代码之家  ›  专栏  ›  技术社区  ›  Khurram

smsGateway。当我想使用API发送短信时,我收到了这个错误

  •  0
  • Khurram  · 技术社区  · 8 年前

    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 回复  |  直到 8 年前
        1
  •  -1
  •   xslash    8 年前

    请验证您的主机中是否启用了cURL

    推荐文章