944,008 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5851
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 29th, 2007
0

php + mysql for web sms

Expand Post »
Hello all,

I am new to php and thus far i'm love the potential this language has as I learn more about it.


I have been trying to write a script to no avail.


What I am trying to accomplish is to setup a sms site from web to mobile. I have looked at allot of other applications but I don't think that those are what i'm looking for. I believe a script would accomplish my goal.


Here's my goal, Webapge layout something like this:



Mobile number Select Provider(drop down box)

Subject (optional)

Message Delivery time (select when to send message)

Captcha (to help avoid bots/spam)


Send



Can anyone assist with this? Please speak in laymans terms as much as possible when responding. Thanks. :lol:
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MKIII is offline Offline
20 posts
since Mar 2007
Mar 31st, 2007
0

Re: php + mysql for web sms

Hi,

Which are you having the problem with? The creation of the form and PHP code to process the form? Or the PHP for sending SMS?

Do you already have some php written that you could post?
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Apr 7th, 2007
0

Re: php + mysql for web sms

Hello!

The php for sending sms messages is simple, but for this to work you will need support of an sms gateway or an smsC. Better get that support before sending messages, try to do a contract with a cell phone company or web2sms sender, they will give you a template of the string in which you can include cell phone number, message ,delivery time and other variables and send the message

Hope it helps,

QaiS
Reputation Points: 10
Solved Threads: 1
Newbie Poster
qaisu is offline Offline
5 posts
since Sep 2006
Feb 20th, 2008
0

Re: php + mysql for web sms

I'm still struggling with both the form and the php code.

I started a few times with a basic form with the following fields: subject, name, cell number & text box. Where i'm really stuck at is, in the 'cell number' text box I would like for that to go to the provider's gateway....but I don't know how to set it up so that once someone inputs the receipient cell number it goes out like this: 1234567890@provider.com etc.


Suggestions please.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MKIII is offline Offline
20 posts
since Mar 2007
Feb 22nd, 2008
0

Re: php + mysql for web sms

Anyone??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MKIII is offline Offline
20 posts
since Mar 2007
Mar 1st, 2008
0

Re: php + mysql for web sms

Click to Expand / Collapse  Quote originally posted by MKIII ...
I'm still struggling with both the form and the php code.

I started a few times with a basic form with the following fields: subject, name, cell number & text box. Where i'm really stuck at is, in the 'cell number' text box I would like for that to go to the provider's gateway....but I don't know how to set it up so that once someone inputs the receipient cell number it goes out like this: 1234567890@provider.com etc.


Suggestions please.
You'll need a good tutorial on HTML forms and PHP form processing.

You'll also need to look up string concatenation in PHP.


I assume you're trying to send TXT messages by using the Email to SMS gateways provided freely by the cell providers.
In order to do this, you'll need the email domain for each cell providers. Do you already have this list?

Once you have this list, you just display the list to the users in a <select> box.

eg:

PHP Syntax (Toggle Plain Text)
  1. <select name="provider">
  2. <option value="tmobile.com">T-Mobile</option>
  3. ...
  4. </select>

You'll also need the phone number of course.

When the form is submitted, you receive the form submission as a HTTP POST, or GET depending on the form method.

So the provider would be in:
PHP Syntax (Toggle Plain Text)
  1. $_POST['provider'];

for a post method.

You take the phone number and concatenate it with the provider and send it via email using the:

mail() function.

http://php.net/mail/
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Mar 5th, 2008
0

Re: php + mysql for web sms

Hello there...

I do have the email domain for the cell providers set to go... I would prefer to not use a 'select box' though.

Yes, i'm reading and trying to understand the PHP processing and I thought I neede to use arrays, however you're mentoning string concentration now?? Hmmm..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MKIII is offline Offline
20 posts
since Mar 2007
Mar 12th, 2008
0

Re: php + mysql for web sms

I guess what you have is a single sms to email gateway. So all you need is to put the number and the domain for that sms gateway together?

All you need then is to concatenate the phone number provided by the user via the form, to the SMS gateway domain.

eg:

PHP Syntax (Toggle Plain Text)
  1. <?php
  2.  
  3. $number = $_GET['number'];
  4.  
  5. $email = $number.'@provider.com';
  6.  
  7. mail($email, ... etc... );
  8.  
  9. ?>
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Mar 12th, 2008
0

Re: php + mysql for web sms

hi
from looking at your previous conversation history
i really think you should gather a wider understanding of php to start doing what you want to do. I learnt through lynda.com but that costs now. I would recommend
http://www.w3schools.com/php/default.asp
as a guide through your learning.

Hope this helps
Reputation Points: 12
Solved Threads: 16
Posting Whiz
Designer_101 is offline Offline
314 posts
since Jul 2007
Apr 24th, 2009
0

Re: php + mysql for web sms

Hi,

I am trying to do something similar.

The difference is that I would like a registered user to click a button on the web page to have a preprogrammed text message sent via email to their cell phone.

I would need the PHP code to concatenate the users cell phone number from the database with their registered providers domain @providersdomain.com (see: http://en.wikipedia.org/wiki/List_of...or_Web_to_SMS), perhaps from an array of domains in the code.

I am looking for a PHP developer to work with on this, I appreciate any recommendations or referrals.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
modnart is offline Offline
1 posts
since Apr 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: store CHECKED checkboxes as variables
Next Thread in PHP Forum Timeline: Required fields in PHP form





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC