How to send SMS with PHP?

Sending SMS with web application can be useful for multiple purposes. For instance you can increase security with integrate multi-factor authentication system and increase security, retrieve forgotten passwords, send marketing messages, notify users about different events and similar.

Diagram below explains a simplified SMS sending flow where PHP application communicates with SMS gateway which converts and forward received data to SMS center (SMSC). SMSC routes data to mobile device (end user).

Sending SMS with PHP

See also

  • gnokii - Allows you to communicate with the phone.
  • Kannel - Open Source WAP and SMS gateway.
  • Nexmo - API for sending text messages.
  • PHP Classes - Several solutions to send SMS with PHP.
  • SMS Gateway
  • SMS Gateway Android - Turn your Android phone into a SMS Gateway.
  • PlaySMS - Free and Open Source SMS Gateway written in PHP based on Gammu SMSD service.
  • Twillio - API for sending text messages.
  • Tutorials:
GitHub OctocatFound a typo? Something wrong with this content? Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all the contributors.