PHP Classes

File: smppexample.php

Recommend this page to a friend!
  Classes of Rene Kluwen  >  SMPP Class  >  smppexample.php  >  Download  
File: smppexample.php
Role: Example script
Content type: text/plain
Description: Usage example of SMPPClass
Class: SMPP Class
Sends SMS messages via an SMPP server
Author: By
Last change: - Added comments
- Show usage of smppclass members
Date: 9 years ago
Size: 1,236 bytes


Class file image Download


File: smppexample.php
Implements: exmaple for smppclass.php::SMPPCLass()
License: GNU Lesser Genercal Public License:
Commercial advertisement: Contact for SMS connectivity and more elaborate SMPP libraries in PHP and other languages.



Caution: Replace the following values with your own parameters.
Leaving the values like this is not going to work!


$smpphost = "";
$smppport = 2345;
$systemid = "chimit";
$password = "smpppass";
$system_type = "client01";
$from = "31495595392";

$smpp = new SMPPClass();
/* bind to smpp server */
$smpp->Start($smpphost, $smppport, $systemid, $password, $system_type);
/* send enquire link PDU to smpp server */
/* send single message; large messages are automatically split */
$smpp->Send("31651931985", "This is my PHP message");
/* send unicode message */
$smpp->Send("31648072766", "&#1589;&#1576;&#1575;&#1581;&#1575;&#1604;&#1582;&#1610;&#1585;", true);
/* send message to multiple recipients at once */
$smpp->SendMulti("31648072766,31651931985", "This is my PHP message");
/* unbind from smpp server */