برای خرید سامانه پیامک همین الان در پیامک آموت ثبت نام کنید
متد وب سرویس
افزودن آدرس انتقال پیامهای دریافتی (RelayRecieveMessageCreate)
آخرین بروزرسانی
شنبه 27 شهریور 1400 15:00
Loading
آدرس وب سرویس
non-wsdl
wsdl
متد RelayRecieveMessageCreate
از طریق این متد می توانید یک آدرس جدید به لیست آدرسهای "انتقال پیامهای دریافتی" اضافه می کند.
Loading
نام | نوع | توضیحات |
UserName | String الزامی | نام کاربری شما در سامانه پیامک آموت |
Password | String الزامی | رمز عبور شما در سامانه پیامک آموت |
URLAddress | String الزامی | آدرس URL |
Loading
نام | نوع | توضیحات |
ReturnValue | Object | |
Loading
string UserName = "MyUserName";
string Password = "MyPassword";
string URLAddress = "http://Mysite.com/RelayRecieveMessage";
SMS.WebService2SoapClient client = new SMS.WebService2SoapClient("WebService2Soap12");
SMS.RelayRecieveMessageCreateResult result = client.RelayRecieveMessageCreate(UserName, Password, URLAddress);
if (result.Status == SMS.Status.Success)
{
//خروجی
}
$url = "https://portal.amootsms.com/webservice2.asmx/RelayRecieveMessageCreate_REST";
$url = $url."?"."UserName=".urlencode("MyUserName");
$url = $url."&"."Password=".urlencode("MyPassword");
$url = $url."&"."URLAddress=".urlencode( "http://Mysite.com/RelayRecieveMessage");
$json = file_get_contents($url);
echo $json;
//$result = json_decode($json);
//echo $result->Status;
ini_set("soap.wsdl_cache_enabled", "0");
$sms_client = new SoapClient('https://portal.amootsms.com/webservice2.asmx?wsdl', array('encoding'=>'UTF-8'));
$parameters['UserName'] = "MyUserName";
$parameters['Password'] = "MyPassword";
$parameters['URLAddress'] = "http://Mysite.com/RelayRecieveMessage";
$result = $sms_client->RelayRecieveMessageCreate($parameters)->RelayMessageDeliveryCreateResult;
echo $result;