How to update a mysql database via SMS text messaging - php

I want to add an additional functionality to a CMS I am making that will allow users to add content to a site via text message. The user should be able to add text by send the message to a number which when received will update the database accordingly.

You have some options - but a SMS gateway is the ideal solution.
Alternatively,
What you will do outside of a number - is to email from the phone. Using PHP - you can interpret the email to look for a keyword in the body or subject line and run a script accordingly.
All SMS capable phones can SEND email from text messages. Instead of entering number - you enter an email address.
It is a very lo-fi version of the implementation - but this method worked perfectly for me and for those not interested in investing in an SMS gateway.

Related

Notifications To Mobile Devices

In PHP if I save the users mobile number into my phpmyadmin database and want to push certain notifications to the users phone I would have to email them at that specified number. How would you go about determining the users carrier to email such as #vtext.com or #at&temail.com or #virginmobile.com ect. How would I determine the ending email to send to? I know there are sites online that can determine this already for you which I can possibly send a curl request to and fetch the carrier it displays on the screen but how do these sites specifically determine these carriers? If they can determine it so can I right? There must be a way?
Most carriers do not offer an email to SMS gateway, so you don't. Use a service designed for sending SMS instead. e.g. Twilio or Amazon Simple Notification Service.

Android app which provides free US mobile numbers for receiving confirmation links from php site

I am developing a PHP site, which requires users to provide their US mobile n umber. The PHP site will send a confirmation link to that number to verify the number for registration. Any mobile can only be registered once.
I need to test the registration for which I will need a US mobile number as I don't have one.
The current problem is that the confirmation message, which is sent using Twilio SMS API, is getting segmented into 2 or more parts.
This is messing up the confirmation link in the SMS i.e. the query string in the confirmation link is getting split up. So the user is not confirmed on clicking the garbled link even if the number is genuine.
Since I have to test the registration multiple times, I was hoping that:
If there is a free Android or iOS app, that provides large number of
US mobile numbers for at least getting inbound messages for free, so
that I can run multiple tests.
Any guidance on twilio api to control the number of segments in the
confirmation message sent from the PHP site or send the confirmation
message in such a way that it does not split up the query string, no
matter what.
I have tried NextPlus but that allots only 1 US number to me and I have already used it for registration and got the same problem with the confirmation link in the message. Some other apps like magic App need payment for the US number.
Sample confirmation message given below:
Hello lbcustomer13,\n Thank you for registering with Lightning Bug.\nPlease click here to complete registration: \n http://example.com/login/?acu=Nzk=
The above message is sent upto the question mark in the first segment:
Hello lbcustomer13,\n Thank you for registering with Lightning Bug.\nPlease click here to complete registration: \n http://example.com/login/?
and
acu=Nzk= in the second segment
Any ideas?
Your message is being truncated because of the maximum character limit (160) in SMS. To control this, you should reduce the text before the link so that the it finishes before the character limit runs out. You can also use URL shortener services to reduce the characters in your link.
I do not have any information about US numbers available but you could have code which sends the message to any mobile no based on a system flag stating if it is in testing phase.

PHP controlled by SMS

I am looking to create a script that is run based on receiving and the content of a text. So I text a phone number (Google Voice number). And the script reads it and executes based on the content. Is the possible to do?
We use an SMS provider called textmagic, but many will be the same, in that they offer an API to use, and/or email notifications. You can set up your account to email you or call an web page with customer parameters when a text message is received (and indeed the other way round to text back).
One thing we used to do was hook up a mobile to a com-port and use our own sim, but this is very hacky and ought to be used as a last resort.

How can my website receive email from a mobile phone?

I want to receive emails from mobile phone and display it on my website implemented PHP.
My site is a free messaging system that sends messages to mobile phones using sendgrid API
I want to display messages from cell phones on my website. Is there any API available ?
You don't need any APIs to do this task. What you need is to setup mail server on your server to be able to receive emails. It's nothing difficult in sms to emails. It's absolutely identical to regular emails. So you should setup your mail server to call your receiver script which will process the email, insert into your database etc. Take a look at exim or qmail.
How it will work:
your website sends email to, lets say, 91700000001#vtext.com from user#yourwebsite.com
91700000001 replies to user#yourwebsite.com that goes to your mail server
you have filter on your mail server to check, for example, if emails came from carriers domain (vtext.com, att.com etc), and hit your receiver script
the receiver scripts gets an email, parse it, inserts into the database
your display the data from the db on your website
Email from mobile? Do you meant text (sms)? Every mobile phone can receive email if they have internet connection. Your question is not very clear, can you rewrite your question to understand very clearly.
SMS GupShup
GupShup Apps platform will allow you to create sms applications that will allow your website to interact with your system.
Check out the FAQ first to see if it meets your requirement.
Then check the requirements for creating your application.
You can find the list of APIs here.
Sample Code (click on Quote App in PHP on extreme left.)

Force SMS messages sent from static email address to use the same number (AT&T example)

This specific example is using AT&T as the carrier of the receiver.
When sending SMS messages to clients via their carrier email address (1234567890#txt.att.net) from a static email address, the messages arrive on the phone from a number in the format of 1 (400) 000-244. Every time a new SMS message is sent, that number changes slightly. This causes phones, such as the iPhone, from properly threading the SMS messages that are coming from the same source email address.
Basic research shows that this has something to do with how AT&T's gateway handles turning emails into SMS messages. We've also looked at and decided that Common Short Codes (CSC) are not worth $1000 per month to purchase, so this is not an option for us.
Does anyone know of another way around this limitation in which it would be possible to force all SMS messages from the same source email to appear that way on the phone so that they are threaded correctly?
In our configuration, the emails are going out via SMTP using the PHP PEAR Mail_Mime package. We're really looking for a way we can do it on our end without the purchase of a shared or dedicated CSC.
Use:
<10 digit phone number>#mms.att.net
Instead of 'txt.att.net'
This will solve the short code dilemma.
For your AT&T issue they use a cluster model to send out SMS using the email gateway. To over come your problem there might be a couple of solutions but it all depends on what your needs are looks like they increment the phone number by one for each new message. Not sure how you could thread these.
Zeep Mobile lets you send SMS with a shared Short Code but they tag the end of your SMS message with ads, but the service is free (limited text per month I think)
Twilio might be a good cheap alternative as they offer such services. No short code but I believe they use the same From number for your threading issue.
Using your own GSM Modem could be an option but there is some work on getting this to work properly. Also it uses a Long Code (Think telephone number) instead of a Short Code.
There are a couple of other solutions so I will update my answer soon.
UPDATE:
Tropo
Google Voice

Categories