Location API on Aloashbei Platform

To work with Aloahbei platform, first configure the .wsdl file for LBS which is given on the Aloashbei site. Or you can download it from here.

index.php

class LBSRequest {
 public $msisdn;
 function  __construct($num) {
 $this->msisdn = $num;
 }
 public $registrationID = "******";
 public $password= "******";
}

class GPInit {
 public $LBSRequest;
}

if(isset ($_POST['number'])) {
 $GPInit = new GPInit();
 $GPInit->LBSRequest = new LBSRequest("88".$_POST['number']);
 $result = $soap->requestLocation($GPInit);
}

Download full code

Send SMS with GrameenPhone API and PHP

To work with Aloahbei platform, first edit the .wsdl file for SMS which is given on the Aloashbei site. Or you can download it from here.

First, make a config.php file.

$soap = new SoapClient("http://service.onnobela.com/sms.wsdl");

$var['registrationID'] = "******";
$var['password'] = "****";
$var['sourceMsisdn'] = '88017********';
$var['smsPort'] = 7424;
$var['msgType'] = 4;
$var['charge'] = 0.00;
$var['chargedParty'] = '88017********';
$var['contentArea'] = 'gpgp_psms';

Now, make the main index.php file put the number and message into the $var array and call sendSMS api.

$var['destinationMsisdn'] = '88'.$_POST['number'];
$var['msgContent'] = $_POST['msg'];

$result = $soap->sendSMS( array ("SendSMSRequest" => $var) );

Download full code