私は今、このsriptを何週間も実行しようとしています。
私が望むのは、これがそこに示されているサーバーにデータを送信し、サーバーの応答を返すことですが、応答から得られるのはURLだけですが、URLは実行されず、応答変数に表示されるだけです
<?php
class send
{
public $username;
public $password;
public $destination;
public $sender;
public $msg;
public $type;
public $dlr;
public $url;
function __construct()
{
}
function send_sms(){
$posturl = 'http://121.241.242.114:8080/bulksms/bulksms?';
$number = $this->destination;
$msg = urlencode($this->msg);
$type='0';
$dlr='1';
$url='';
$posturl = $posturl."source=".$this->sender."&username=".$this->username."&password=".$this->password."&type=".$type."&dlr=".$dlr."&destination=".$number."&message=".$msg;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $posturl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
return $posturl;
}
}
?>