PHP 5 Simple SMS send Class
Posted on June 15th, 2009 by Nick.
Categories: All SMS Gateway Documentation, PHP Classes, Technical
This blog post has been superseded with our website documentation
2 classes available in php 5, SendSMS and SendSMSXML (recommended)
Class Name: SendSMS (depreciated)
This class is a nice and easy way to start sending SMS’s with the Text Marketer system, please feel free to modify at will. You just need the username and password from your account login as the constructor arguments.
Download the PHP 5 SMS API Class
Example of use
<?
$sms = new SendSMS("myUsername","myPassword");
if($sms->send("4477777777","my message","me")) echo "message sent";
else echo "message failed";
?>
Class Name: SendSMSXML
An updated class from SendSMS which uses the XML response and is simpler to use, please feel free to modify at will. You just need the username and password from your account login as the constructor arguments.
Download PHP 5 SMS API Class
Example of use
<?
$sms = new SendSMSXML("myUsername","myPassword");
if($sms->send("4477777777","my message","me")){
echo "I have ".$sms->getCreditsRemaining()." left and I used ".$sms->getCreditsUsed()." credits";
}
else {
while($error = $sms->getError())
{
echo $error;
}
}
?>
Popularity: 13%
Related posts:
- PHP 5 SMS Send Class implementing listeners on our SMS Gateway
Class Name: SendSMSNotifier This class is designed around the FREE Text Marketer SMS API, you need to sign up here... - PHP 5 Delivery Report Helper Class for our SMS Gateway
Class Name: ProcessDeliveryReport This class enables you to access your delivery reports in a nice simplified way. You can search for... - How to integrate our SMS Gateway API into your systems
Introduction Adding SMS as a communication method to a system is often very useful, for instance you don’t have issues... - SMS Gateway API – Specification
This blog post has been superseded with our website documentation It is recommended that you use the RESTful version of the API which has largely superseded this document... - Text Marketer short code / txtUs API options
Introduction The keyword on your system (on short code 88802) or your txtUs number can be used to “route” incoming...



