SMSGlobal.com PHP SDK for SOAP-API
Note: Your web server should support SOAP extension, JSON (json_encode()
, json_decode()
functions) and SimpleXML (simplexml_load_string()
function)
try {
require_once "smsglobal.php";
} catch (Exception $e) {
$e->getMessage();
}
Way 1. Pass username and password to authenticate.
$sms = new SMSGlobal("username", "password");
Way 2. Leave username and password empty and set ticket (if you have one) manually.
$sms = new SMSGlobal();
$sms->setTicket("2ba88aa3b6b550662358eod5eb138a72");
Way 3. Leave username and password empty and call validateLogin()
method.
$sms = new SMSGlobal();
$sms->validateLogin("username", "password");
$smsID = $sms->sendSms("YourCompanyName", "1888123456", "Hello World!");
$myCredit = $sms->getCredit();
$smsBalance = $sms->getSmsBalance("US");
$sms->renewTicket();
$myCredit = $sms->logout();
print_r($sms->getLog());
Feel free to fork, modify and pull commits ;) Open issues for any ideas or bug reports