How To Design SMS Website


Background of sending SMS from website with Raspberry Pi

Are you curious about the most easiest way to send SMS from your website? Nowadays, I have become really interested in the field of Internet of Things (IoT), therefore I thought it would be cool to integrate a Raspberry Pi to this SMS messaging solution.
Accordingly, this tutorial is intended to provide a full review on how to send SMS from a PHP website through HTTP requests and responses by using Raspberry Pi. It is gonna be exciting!
For better understanding, let me outline the basics of the SMS technology briefly. Let’s start in the beginning of the process and take a look at what happens while the SMS is being transmitted from the sender to the recipient. In order to send an SMS there is a need for an application allowing you to compose a message. (In this case this is a web application, since we are going to write and send SMS on a website.) This application should be connected to an SMS gateway, because this gateway is capable to transmit the SMS towards the mobile service provider (e.g. T-Mobile, Vodafone, Orange, etc.). The SMS gateway usually transmits the SMS through a GSM modem or over the Internet (it is determined by your configurations depending on your specific needs). After the SMS has arrived to the SMSC (SMS Center) of the mobile service provider, the provider will send the SMS to the recipient’s telephone number.
This solution provides a great way to integrate SMS solution into any website (including webshops, client gate systems, contact us sites, community-based pages, etc.), but it is also possible to use this website, powered by Raspberry Pi, to provide SMS service commercially. (For example you can protect your site with password, and your customers, who have personal username-password combination to use your site, can use this platform for sending messages.) It sounds interesting, isn't it? Let's do it!

Table of Contents

  • STEP 1: Configure your website and create an SMS sender web application
  • STEP 2: Let the webserver be able to manage the SMS web application
  • STEP 3: Send a test SMS message from your website
  • STEP 4: Conclusion and References

Hardware and software requirements

To implement the previously outlined SMS messaging solution, you will need a webserver that is able to handle the web applications. You will also need a computer that manages your website: the Raspberry Pi appears here. And finally, an SMS gateway also needs to be installed on a PC to be able to send the messages. (Please note that a GSM modem or IP SMS connection needs to be configured to be able to send out the SMS messages in deed.) Let’s take a closer look at the prerequisites in more details:
  1. aspberry Pi: The Raspberry Pi is a low cost, credit-card sized computer. This tiny device enables you to do everything you would expect a desktop computer to do, from browsing the Internet and playing HD video, to making spreadsheets, word-processing, etc. What is more, the Raspberry Pi has the ability to interact with the outside world, so it allows to send SMS messages from a website as well. In this solution Raspberry Pi is used to manage the website.
  2. Webserver (Apache): Concerning that a web application is used to compose the SMS message in this solution, a webserver is essentially needed. To be able to reach your website in a browser, you need to download and install a webserver such as Apache. After you have installed the webserver, you need to establish connection between your Raspberry Pi and the webserver. For this purpose, you need to copy and paste the apt-get install apache2 php5 command into the /var/www folder of the Apache. (More information on how to install the Linux-Apache-PHP components to run a Dynamix HTML webpage on a Raspberry Pi – LAMP webserver.)


  1. PHP component: To let your webserver be able to manage the web applications, you need to install PHP on your Apache webserver. (This configuration will be described henceforth.)
  2. SMS gateway (Ozeki NG SMS Gateway): As it was mentioned above, an SMS gateway is essentially needed to be able to send SMS messages from your website. It should be downloaded and installed on a computer.
  3. GSM modem or IP SMS connection: Within your SMS gateway some configurations are required to be able to send out the SMS messages in deed. You need to setup a GSM modem connectivity by using a GSM device, or you need to configure an IP SMS connection after you have contracted with a mobile service provider. But what if you have not got any installed service provider connection right now? No problem. You can test the application by simulating the SMS sending. In this solution this case will be present: you will see how to test this solution freely using Ozeki NG.
  4. Windows PC: The SMS gateway I used is Windows-based, so a Windows PC is also needed to be able to install the SMS gateway.

0 comments :