Jump to content

Recommended Posts

Hello, I'm pretty sure this is possible, but I have no idea where to start... I'm creating an anonymous messaging system for my school and I've had a lot of students request that they be able to send messages via sms text.  I want to find a way for the students to send a text message to some number or maybe an email address using their cell phone.  I want to have a php page that processes the message and then forwards it to a specific person depending on what the first word of the message is. 

 

For example:

Someone sends a message that reads: "John: This is a text message."

I want to be able to forward the message, "This is a text message." to the user named John.

 

Any ideas on where to start?  Is this even something that can be feasibly done?

Link to comment
https://forums.phpfreaks.com/topic/214759-sms-text-messaging/
Share on other sites

Using the beginning of the text message to determine the recipient would appear to be a weak method due to possible spelling errors. Using separate addresses for each recipient would at least allow the user to save the address for subsequent use.

 

Also, I see no way to do this (easily) by sending the SMS to a phone number. I think you are going to have to have them send it to an email address.

 

So, I think the solution to both of the problems above is . . . drumroll . . . GMail!

 

Create a GMAil account, let's say it is send_to@gmail.com. Now, if someone wants to send a message to john they would use the address send_to+john@gmail.com. To send a message to susy the user would use send_to+suzy@gmail.com.

 

GMail has a feature that allows you to append a tag/label to the username with the plus symbol. BUt, the email will still go to the original address. (There are many uses for this).

 

So, the second part of the equation is how do you recieve those emails. You can use PHP to access those emails: http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS398&q=php+read+gmail&aq=f&aqi=g1&aql=&oq=&gs_rfai=CxpqntZSjTNvvBYW8NqL3wOYIAAAAqgQFT9CN9BY

 

Then it is just a matter of determining which user was identified in the receiving email address and forwarding to the appropriate person. Of course, you will need to identify each person and what their phone number is and their carrier. Most/all carriers allow SMS messages to be sent to their subscribers via email, e.g. 3124567378@sms.verizon.com (just an example).

Link to comment
https://forums.phpfreaks.com/topic/214759-sms-text-messaging/#findComment-1117322
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.