Sending SMS from PHP


How to send an SMS from a web server written in PHP?

2/10/2014 11:05:20 AM

Accepted Answer

Clickatell is a popular SMS gateway. It works in 200+ countries.

Their API offers a choice of connection options via: HTTP/S, SMPP, SMTP, FTP, XML, SOAP. Any of these options can be used from php.

The HTTP/S method is as simple as this: (Clickatell API Guide)

The SMTP method consists of sending a plain-text e-mail to:, with the following body:

user: xxxxx
password: xxxxx
api_id: xxxxx
to: 448311234567
text: Meet me at home

You can also test the gateway (incoming and outgoing) for free from your browser: "Test SMS Gateway".

12/21/2009 12:01:27 PM

PHP by itself has no SMS module or functions and doesn't allow you to send SMS.

SMS ( Short Messaging System) is a GSM technology an you need a GSM provider that will provide this service for you and may have an PHP API implementation for it.

Usually people in telecom business use Asterisk to handle calls and sms programming.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow