Как добавить API Roums Bulksms на сайт PHP?

У меня есть онлайн-форма, которую пользователи заполняют и регистрируют. Я хочу, чтобы они получили SMS-уведомление о том, что их регистрация прошла успешно. У меня также есть API Routes.

Когда вы вводите эту ссылку в браузере:

http://sms.brantilo.com:8080/bulksms/bulksms?username=xxxx&пароль = хххх&Тип = 0&DLR = 1&назначения = 2348936454&Источник = FitzPiro&сообщение = Спасибо, Ваша регистрация прошла успешно

он доставляется на номер 2348936454 и возвращает отчет о доставке сообщения.

Вот мой код, который не приводит к полученному SMS-сообщению:

        //Send SMS and Email  Heredefine('jit_user','nem-piro');
define('jit_pwd','xxxxxx');

define('enable_sms',1);
define('credit_load',5);

define('smssenderid',"SampleID");

if(enable_sms){
$jit_user = jit_user;
$jit_pwd = jit_pwd;
$mobile = $data->mobile;
$smsBody ="Hello {$surname} {$othername}, your registration was successful. Thank you!";
$smsSender = smssenderid;
$link = "http://sms.brantilo.com:8080/bulksms/bulksms?username={$jit_user}&password={$jit_pwd}&type=0&dlr=1&destination=" . urlencode($mobile) ."&source=" . urlencode($smsSender) ."&message=" .  urlencode($smsBody);
$result = file_get_contents($link);
}
//Send SMS and Email Here

$session->data['UTMEregnum'] = $reg;
$session->data['data'] = $data;
$session->save();

$ref_from = "./utme-register-ok.php";
}else{
$ref_from = "./register.php?err=signup_no";
}

0

Решение

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*******************************route1************************************************************************************************************/

$config['route1_url']=' ';

$config['route1_notify_url']='';

$config['route1_acc_blnce_url']='';

$config['route1_authorization_method']='Basic';

$config['route1_username']='Allsee';

$config['route1_password']='Techas12';

$config['route1_sms_validity_period']=360;

$config['route1']=1;

$config['route1_transliteration']="NON_UNICODE";

$config['route1_minimum_balance']=1000;

/***************************************route2****************************************************************************************************/

$config['route2_url']='';

$config['route2_notify_url']='';

$config['route2']=2;

$config['route2_username']='';

$config['route2_password']='';

$config['route2_dlr_value']=1;

$config['route2_bodytype']=1;

$config['route2_sms_validity_period']= ;

/**************************************************general******************************************************************************************/

$config['limitcount']= ;

$config['loopcount']= ;

$config['debug']=FALSE;
-1

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector