«aql messaging services»    «aql voice services»
 


»Sign Up     »Contact Us  
 
 
       

Geographic Numbers - Example PHP




Account Login
Lost password?

aql ®
  Award Winning Service
 
aql Telecoms
  Click here to view aql's range of voice fax and Business Voice over IP telephony solutions
 
New Accounts
  Signup for a starter account from only £6+VAT.

If you are a business user, apply here for a free trial account




Example PHP Code

Please feel free to copy this code and use it as you please. You can also download the appropriate files here:

Create MySQL Database to store the data

MySQL Class - Manages the connection and actions on the database

Inbound Action - Script which is actioned

Inbound View - View inbound SMS


//include the database handling class
include("mysqlclass.php");

//Assign POSTED variables
$originator = $_POST['originator'];
$destination = $_POST['destination'];
$message = $_POST['message'];
$time = $_POST['time'];
$unixTime = $_POST['unix_time'];
$udh = $_POST['udh'];
$id = $_POST['id'];

//Create a new instance of the mysql class and write data to database

$mysql = New mysql(0);
  
$sql = "
  INSERT INTO 
    inbound 
      (varOriginator, varDestination, varMessage, dtTime, varUnixTime, varUDH, intId) 
    VALUES ('$originator','$destination', '$message', '$time', '$unixTime', '$udh', '$id')";
        
$mysql->query($sql);