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


$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….”);


To use SendSMS class, you need:

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

Download SendSMS PHP class (version 0.5)

5 Replies to “Example Code: How to Send SMS from PHP (via Clickatell)”

  1. very nice article…i have successfully send message through Clickatell, but i also get this message :
    Deprecated: Function split() is deprecated in C:\xampp\htdocs\api\SendSMS.php on line 61.

  2. Thank you for sharing this. But there is any script exist that work with my server no need to register on other blog. just sent sms by uploading the script on server

Comments are closed.