我从yii2开始。我想用yii2发送短信。有人可以帮忙吗?
我写了这段代码,但看不到结果
$phone = array($_POST["phone"]);
$message = array($rand);
$client = new SoapClient("http://parsasms.com/webservice/v2.asmx?WSDL");
$params = array(
'username' => 'demo',
'password' => 'demo',
'senderNumbers' => array("30005006002651"),
'recipientNumbers'=> $phone,
'messageBodies' => $message
)
);
$results = $client->SendSMS( $params );