コード例 #1
0
ファイル: ussdap.php プロジェクト: shehanb/ussd-arduino-LED
require 'class/operationsClass.php';
require 'libs/Log.php';
require 'db.php';
require_once 'libs/SMSReceiver.php';
require_once 'libs/SMSSender.php';
define('APP_ID', 'APPID');
define('APP_PASSWORD', 'password');
$production = false;
if ($production == false) {
    $ussdserverurl = 'http://localhost:7000/ussd/send';
    $smsserverurl = 'http://localhost:7000/sms/send';
} else {
    $ussdserverurl = 'https://api.dialog.lk/ussd/send';
    $smsserverurl = 'http://api.dialog.lk/sms/send';
}
$receiver = new UssdReceiver();
$sender = new UssdSender($ussdserverurl, APP_ID, APP_PASSWORD);
$smssender = new SMSSender($smsserverurl, APP_ID, APP_PASSWORD);
$operations = new Operations();
$content = $receiver->getMessage();
// get the message content
$address = $receiver->getAddress();
// get the sender's address
$requestId = $receiver->getRequestID();
// get the request ID
$applicationId = $receiver->getApplicationId();
// get application ID
$encoding = $receiver->getEncoding();
// get the encoding value
$version = $receiver->getVersion();
// get the version
コード例 #2
0
<?php

ini_set('error_log', 'ussd-app-error.log');
require 'libs/MoUssdReceiver.php';
require 'libs/MtUssdSender.php';
require 'class/operationsClass.php';
require 'log.php';
require 'db.php';
require 'connect.php';
$ussdserverurl = "https://api.dialog.lk/ussd/send";
$receiver = new UssdReceiver();
$sender = new UssdSender($ussdserverurl, 'APP_000001', 'password');
$operations = new Operations();
$receiverSessionId = $receiver->getSessionId();
$content = $receiver->getMessage();
// get the message content
$address = $receiver->getAddress();
// get the sender's address
$requestId = $receiver->getRequestID();
// get the request ID
$applicationId = $receiver->getApplicationId();
// get application ID
$encoding = $receiver->getEncoding();
// get the encoding value
$version = $receiver->getVersion();
// get the version
$sessionId = $receiver->getSessionId();
// get the session ID;
$ussdOperation = $receiver->getUssdOperation();
// get the ussd operation
$responseMsg = array("main" => "Keth-Net\n1. Sinhala\n2. English\n\n99. Exit", "Sinhala" => "Keth-Net\n1. Ganudenu Karuweku sandaha visthara laba ganima\n2. Wagahimiyeku sandaha visthara laba ganima\n\n99. Exit", "English" => "Keth-Net\n1. Information about farmers\n2. Information about buyers\n\n99. Exit", "Pradeshaya" => "Keth-Net\n1. Oba Pradeshaye\n2. Wenath Pradeshayaka\n\n99. Exit", "Province" => "Keth-Net\n1. Of your Province\n2. Of another Province\n\n99. Exit", "PalathList" => "Keth-Net\n1.Uthuru mada\n2.Madyama\n3.Uthura\n4.Basnahira\n5.Dakuna\n6.Nagenahira\n7.Sabaragabuwa\n8.Wayamba\n9.Uva\n\n99. Exit", "ProvinceList" => "Keth-Net\n1.North Central\n2.Central\n3.North\n4.Western\n5.Sourthern\n6.Earstern\n7.Sabaragabuwa\n8.North Western\n9.Uva\n\n99. Exit");
コード例 #3
0
ファイル: ussdap.php プロジェクト: nilupull/USSD-PHP-API
<?php

ini_set('error_log', 'ussd-app-error.log');
require 'libs/MoUssdReceiver.php';
require 'libs/MtUssdSender.php';
require 'class/operationsClass.php';
require 'libs/log.php';
require 'db.php';
$production = false;
if ($production == false) {
    $ussdserverurl = 'http://localhost:7000/ussd/send';
} else {
    $ussdserverurl = 'https://api.dialog.lk/ussd/send';
}
$receiver = new UssdReceiver();
$sender = new UssdSender($ussdserverurl, 'APP_000001', 'password');
$operations = new Operations();
var_dump($operations);
$receiverSessionId = $receiver->getSessionId();
$content = $receiver->getMessage();
// get the message content
$address = $receiver->getAddress();
// get the sender's address
$requestId = $receiver->getRequestID();
// get the request ID
$applicationId = $receiver->getApplicationId();
// get application ID
$encoding = $receiver->getEncoding();
// get the encoding value
$version = $receiver->getVersion();
// get the version
コード例 #4
0
ファイル: ussdap.php プロジェクト: MilindaLaknath/TeamRED
$production = false;
$APP_ID = "APP_ID";
$PASSWORD = "******";
if ($production == false) {
    $ussdserverurl = 'http://localhost:7000/ussd/send';
    $LBS_SERVER_URL = "http://localhost:7000/lbs/locate";
    $SMS_SERVER_URL = "http://localhost:7000/sms/send";
    $SUBSCRIPTION_SERVER_URL = "http://localhost:7000/subscription/send";
} else {
    $ussdserverurl = 'https://api.dialog.lk/ussd/send';
    $LBS_SERVER_URL = 'https://api.dialog.lk/lbs/locate';
    $SMS_SERVER_URL = "https://api.dialog.lk/sms/send";
    $SUBSCRIPTION_SERVER_URL = "http://api.dialog.lk:8080/subscription/send";
}
$log = new Logger();
$receiver = new UssdReceiver();
$sender = new UssdSender($ussdserverurl, $APP_ID, $PASSWORD);
$operations = new Operations();
$receiverSessionId = $receiver->getSessionId();
$content = $receiver->getMessage();
// get the message content
$address = $receiver->getAddress();
// get the sender's address
$requestId = $receiver->getRequestID();
// get the request ID
$applicationId = $receiver->getApplicationId();
// get application ID
$encoding = $receiver->getEncoding();
// get the encoding value
$version = $receiver->getVersion();
// get the version
コード例 #5
0
ファイル: ussdap.php プロジェクト: shehanb/ussd-php-hsenid
//Shehan Bhavan - hSenid Mobile Solutions
//shehanb@hsenidmobile.com
//Dialog Ideamart
ini_set('error_log', 'ussd-app-error.log');
require 'libs/MoUssdReceiver.php';
require 'libs/MtUssdSender.php';
require 'class/operationsClass.php';
require 'libs/Log.php';
require 'db.php';
$production = false;
if ($production == false) {
    $ussdserverurl = 'http://localhost:7000/ussd/send';
} else {
    $ussdserverurl = 'https://api.dialog.lk/ussd/send';
}
$receiver = new UssdReceiver();
$sender = new UssdSender($ussdserverurl, 'APP_000001', 'password');
$operations = new Operations();
$content = $receiver->getMessage();
// get the message content
$address = $receiver->getAddress();
// get the sender's address
$requestId = $receiver->getRequestID();
// get the request ID
$applicationId = $receiver->getApplicationId();
// get application ID
$encoding = $receiver->getEncoding();
// get the encoding value
$version = $receiver->getVersion();
// get the version
$sessionId = $receiver->getSessionId();