简体   繁体   中英

How to send SMS by SOAP API in PHP

I want to send an SMS message in PHP using SOAP API. I have the username , password , to , and text parameters.

I am trying to use this API: http://api.payamak-panel.com/post/send.asmx?wsdl

The method I am using is SendByBaseNumber .

Username    String  
Password    String  
text        []String    
to          String  
bodyId      Int 

My code:

$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$smsSoap= $api->sms('soap');
$to = '09123456789';
$smsSoap->sendByBaseNumber($text, $to, $bodyId);

see : https://github.com/Melipayamak/melipayamak-php

sample code is here A PHP wrapper for melipayamak's web services

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM