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:
- Raspberry 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.
- 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.)
- 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.)
- 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.
- 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.
- 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.
Hello Everyone.
actually one thought comes in my mind which i want to share with you all..that is it possible to write such a vbscript for sending Text SMS to a any mobile phone by using Excel sheet data..Means my vbscript fetch the the data from a particular column (ie Mobile no).and send a text message which stores in another column .so is it possible to do such thing..is there anyone who did this before..
Plz replay me..if you know anything about this kind of thing..
your all suggestion are welcome..
Regards
Pravin.
I have a program that I need to send an alert to my email from when a certain event happens. I found a VBScript on MS Technet that should work.
'
'
' NAME: MailUsingOutlook.vbs
'
' COMMENT: This script generates an e-mail using the Outlook client.
'
'
'
' NAME: MailUsingOutlook.vbs
'
' COMMENT: This script generates an e-mail using the Outlook client.
'
'
'Create an Outlook object
Dim Outlook 'As New Outlook.Application
Set Outlook = CreateObject('Outlook.Application')
'Create e new message
Dim Message 'As Outlook.MailItem
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = 'New event'
.Body = 'New event'
Dim Outlook 'As New Outlook.Application
Set Outlook = CreateObject('Outlook.Application')
'Create e new message
Dim Message 'As Outlook.MailItem
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = 'New event'
.Body = 'New event'
Free logic pro studio download. The kit contains drum kit samples and SF2 SoundFonts you can use in FL Studio and easily import into other DAWs like Ableton, Logic, etc. This FL Studio Trap Pack is a complete sound kit for trap producers. In the drum kit folder you will find an collection of kicks, 808s, claps, snares and percussion samples. Up your production game now use this to make 808 heavy trap, hiphop and future bass tracks in no time!FL Studio Trap Pack:This Trap Pack for FL Studio contains high quality WAV samples which can be imported directly into your DAW or sampler of choice (FL Studio, Ableton, Logic, Reaper, Cubase, Studio One, Reason, Pro Tools, Native Instruments MASCHINE, Akai MPC Renaissance, MPC1000 to MPC 5000 etc).
Witcher 3 new game plus plus mod 1. 'Set destination email address
.Recipients.Add ('john smith')
.Recipients.Add ('john smith')
'Set sender address.
Const olOriginator = 0
.Recipients.Add('john smith').Type = olOriginator
.Recipients.ResolveAll
Const olOriginator = 0
.Recipients.Add('john smith').Type = olOriginator
.Recipients.ResolveAll
'Send the Message
.Send
End With
.Send
End With
However when I run the VBScript, i get the following undeliverable email message in Outlook 2007.
Your message did not reach some or all of the intended recipients.
Subject:New event
Sent:7/28/2010 12:10 PM
The following recipient(s) cannot be reached:
SMITH, JOHN on 7/28/2010 12:10 PM
This message could not be sent. Try sending the message again later, or contact your network administrator.Error is [0x80070057-00000000-00000000].
I am running Windows 7 Enterprise, Outlook 2007 in Cached Exchange Mode.
I'm trying to send an SMS using Twilio. I found an article (https://www.twilio.com/blog/2010/04/using-twilio-with-classic-asp-and-vbscript.html) that shows how to do this by VBScript, but I was wondering how to amend the script when sending a POST request from a client computer and not a server.
Send Sms Via Vbscript To Read
I tried to give this a first pass, but I'm not too familiar with VBScript. Crack quickbooks point of sale 2013 2017. I found some articles saying to use the System.Web.HttpUtility to run URLEncode()
Any help would be much appreciated.
Lankymart12k44 gold badges4242 silver badges113113 bronze badges
DLeeDLee
1 Answer
As VBScript doesn't have a native function, you will have to either create your own or find another workaround (like a COM library that will do it for you).
In the past, I've used this code, which has worked well (originally taken from this gist, which was inspired by a VBA solution on StackOverflow).
Useful Links
- A: How can I post data using cURL in asp classic?(question aimed at Classic ASP but advice still relevant to plain old VBScript)
Community♦
LankymartLankymart12k44 gold badges4242 silver badges113113 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.