0

我有一个用户填写和注册的在线表格。我希望他们收到短信提醒,通知他们注册成功。我也有一个路由 API。

当您在浏览器中键入此链接时:

http://sms.brantilo.com:8080/bulksms/bulksms?username=xxxx&password=xxxx&type=0&dlr=1&destination=2348936454&source=FitzPiro&message=谢谢,注册成功

它被传递到 2348936454 并返回消息传递报告。

这是我的代码,它不会导致收到短信:

        //Send SMS and Email  Here


        define('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"; 
    }
4

1 回答 1

-1
<?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;
于 2018-11-08T16:57:42.313 回答