dougu8742 2015-05-23 21:09
浏览 100

简单的PHP代码,用于将Infobip短信发送到手机

I need assistance in sending sms from a form on a website.
I have tried the code below with no success.

<?php 
$username = '';
$password = '';

$from = $_POST['from'];
$to = $_POST['to'];
$message = $_POST['message'];
$text = urlencode($message);
//Send sms   
private function sendSms(){        
      $posturl='http://api.infobip.com/api/v3/sendsms/plain?user=$username&password=$password&sender=$from&SMSText=$text&GSM=$to'; 
}
?>
  • 写回答

3条回答 默认 最新

  • dtamho6404 2015-05-23 21:32
    关注

    You should add some logic to call the actual $posturl.

    You can check cUrl, or do a simple file_get_contents($posturl);

    评论

报告相同问题?