Compare the Market: Nobody’s lower priced for quality SMS Lowest Bulk SMS Prices Free Bulk SMS Software
text marketer reviews Text Marketer RSS feeds

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:

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...

Comments are closed.