Exemple #1
0
 * User: me
 * Date: 8/20/15
 * Time: 5:14 PM
 */
//namespace login;
//use Base\AppBundle\Controller\DefaultController;
use Base\DataAccessBundle\Entity\Student;
//use Base\DataAccessBundle\Controller;
include_once '../libs/ussd/MoUssdReceiver.php';
include_once '../libs/ussd/MtUssdSender.php';
include_once '../libs/log.php';
include_once '../../src/Base/DataAccessBundle/Entity/Student.php';
//include_once '../../src/Base/DataAccessBundle/Controller/DefaultController.php';
ini_set('error_log', 'ussd-app-error.log');
//$dc =new DefaultController();
$receiver = new MoUssdReceiver();
// Create the Receiver object
$receiverSessionId = $receiver->getSessionId();
session_id($receiverSessionId);
//Use received session id to create a unique session
session_start();
$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
Exemple #2
0
<?php

include_once '../libs/ussd/MoUssdReceiver.php';
include_once '../libs/ussd/MtUssdSender.php';
include_once 'config.php';
include_once '../libs/dbinteract.php';
include_once '../libs/log.php';
ini_set('error_log', 'ussd-app-error.log');
$getUSSD = new MoUssdReceiver();
$USSDSessionID = $getUSSD->getSessionId();
session_id($USSDSessionID);
session_start();
$content = $getUSSD->getMessage();
// get the message content
$address = $getUSSD->getAddress();
// get the sender's address
$requestId = $getUSSD->getRequestID();
// get the request ID
$applicationId = $getUSSD->getApplicationId();
// get application ID
$encoding = $getUSSD->getEncoding();
// get the encoding value
$version = $getUSSD->getVersion();
// get the version
$sessionId = $getUSSD->getSessionId();
// get the session ID;
$ussdOperation = $getUSSD->getUssdOperation();
// get the ussd operation
$Messages = array("main" => "Welcome to Lyrisize!\nEnter the name of the Song:");
logFile("Previous Menu is := " . $_SESSION['menu-Opt'] . $Messages["main"]);
if ($getUSSD->getUssdOperation() == "mo-init") {