Example Code: How to Send SMS from PHP (via Clickatell)

Hi there, due to popular demand (requests sent to my personal email – mypapit -at- gmail.com).

I decided to share my old post regarding my simple SendSMS php class which can help php developers to send SMS from their web application

[php]
require(‘SendSMS.php’);

$sendsms = new SendSMS(“username”,”password”,”HTTP POST API key”);

/* if the login return 0, means that login failed, you cant send sms after this */
if ( ($sendsms->login()) == 0 ) {
die( “failed”);
}

/*other wise, you can send sms using the simple send() call*/
$sendsms->send(“0132073011″,”can you receive this message? Hello there….”);

[/php]

Requirements
To use SendSMS class, you need:

That’s it.. contact me if you’ve more questions

Download SendSMS PHP class (version 0.5)
.
.
.