How to send an SMS from a web server written in PHP?
To send an sms to a phone, all you have to do is email the message to the phone number. The email address is just the phone number and carrier domain. Determine Domain Each carrier has their own domain for text. For example, AT&T is @txt.att.net while Verizon is @vtext.com.
Available with all digital phones and calling plans, vtext.com works with Verizon Wireless' popular Mobile MessengerSM text messaging service. When sending a message to a wireless phone, vtext.com allows the sender to confirm delivery that the message was received by the phone and provides a date and time stamp.
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:
http://api.clickatell.com/http/sendmsg?to=NUMBER&msg=Message+Body+Here
The SMTP method consists of sending a plain-text e-mail to: [email protected]
, 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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With