PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Dec 08, 2019 11:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Mon May 17, 2004 11:07 am 
Offline
Forum Newbie

Joined: Mon May 17, 2004 8:59 am
Posts: 2


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 8:14 pm 
Offline
Moderator
User avatar

Joined: Sat Apr 20, 2002 3:14 pm
Posts: 1416
Location: Dallas, TX
I've fixed the code to coinside with the structure that I program with now. Tell me if you keep getting any errors.

Syntax: [ Download ] [ Hide ]
<?php  

        echo "<html>\n";

        echo "<body>\n";

        echo "<font style="font: 12px Verdana; color: #000000;">\n";

       

        if ($_POST["action"] == "send")

        {

                // Sort through services

                switch($_POST["service"])

                {

                        case 'att':             $service = "mobile.att.net";            break;

                        case 'cingular':                $service = "mycingular.com";    break;

                        case 'nextel':          $service = "messaging.nextel.com";      break;

                        case 'qwest':           $service = "qwestp.com";                break;

                        case 'sprintpcs':               $service = "messaging.sprintpcs.com";   break;

                        case 't-mobile':                $service = "tmomail.net";               break;

                        case 'verizon':         $service = "vtext.com";         break;

                        case 'voicestream':     $service = "voicestream.net";   break;

                }

               

                // Trim up a few variables

                $number = str_replace("(", "", $_POST["number"]);

                $number = str_replace(")", "", $number);

                $number = str_replace("-", "", $number);

                $number = str_replace(" ", "", $number);

                $number = eregi_replace("^[a-zA-Z]$", "", $number);

                $smsto = $number . "@" . $service;

               

                if (strlen($message) > 130) {

                        echo "Message is too long. Try keeping the message under/exactly 130 characters.<p>\n\n";

                }

                else

                {

                        @mail($smsto, $subject, $message)

                                or die("Unable to send your message. You might have to enable your server to send mail using mail() in your php.ini file.");

                       

                        echo "Your message has been sent.<p>\n\n";

                }

        }

       

        echo "<form method="POST" action="" . $_SERVER['PHP_SELF'] . "">\n";

        echo "<input type="hidden" name="action" value="send">\n";

        echo "<table border="0" cellspacing="2" cellpadding="0" style="font: 12px Verdana; color: #000000;">\n";

       

        echo " <tr>\n";

        echo "  <td><b>Message:</b></td>\n";

        echo "  <td valign="top"><textarea name="message" rows="5" cols="18" wrap="no" style="font: 12px Verdana; color: #000000;"></textarea></td>\n";

        echo " </tr>\n";

       

        echo " <tr>\n";

        echo "  <td><b>Number:</b></td>\n";

        echo "  <td valign="top" align="left"><input type="text" name="number" style="font: 12px Verdana; color: #000000;"></td>\n";

        echo " </tr>\n";

       

        echo " <tr>\n";

        echo "  <td><b>Service:</b></td>\n";

        echo "  <td valign="top" align="left">\n";

       

        // List out the services

        echo "  <select name="service" style="font: 12px Verdana; color: #000000;">\n";

        echo "          <option value="att">AT&T Wireless\n";

        echo "          <option value="cingular">Cingular\n";

        echo "          <option value="nextel">Nextel\n";

        echo "          <option value="qwest">Qwest Wireless\n";

        echo "          <option value="sprintpcs">Sprint PCS\n";

        echo "          <option value="t-mobile">T-Mobile\n";

        echo "          <option value="verizon">Verizon\n";

        echo "          <option value="voicestream">VoiceStream\n";

        echo "  </select>\n";



        echo "  </td>\n";

        echo " </tr>\n";

        echo " <tr>\n";

        echo "  <td valign="top" align="left">&nbsp;</td>\n";

        echo "  <td valign="top" align="left">\n";

        echo "  <INPUT TYPE="submit" width="84" height="15" border="0" value="Send Message" style="font: 12px Verdana; color: #000000;">\n";

        echo "  </td>\n";

        echo " </tr>\n";

        echo "</table>\n";

        echo "</form>\n";

        echo "</font>\n";

        echo "</body>\n";

        echo "</html>";

?>

_________________


Top
 Profile  
 
 Post subject: :(
PostPosted: Sat Jun 19, 2004 9:33 pm 
Offline
Forum Commoner

Joined: Tue Mar 16, 2004 5:54 pm
Posts: 27
that doesnt work for me

I dont receive any SMS[/google][/php_man]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 31, 2004 2:25 am 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
Sure you have the right service provider address?

Sure you added your area code before your number?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 31, 2004 2:31 am 
Offline
Forum Commoner

Joined: Tue Mar 16, 2004 5:54 pm
Posts: 27
yep and yep


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 31, 2004 2:35 am 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada
You're provider might require additional mail headers to be defined for spam filtration reasons.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 9:34 pm 
Offline
DevNet Resident
User avatar

Joined: Sat Jan 25, 2003 2:49 am
Posts: 1094


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 12:09 am 
Offline
Neighborhood Spidermoddy
User avatar

Joined: Mon Mar 29, 2004 4:24 pm
Posts: 31559
Location: Bothell, Washington, USA
unless you get charged per sms.. yikes :P


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 10:40 am 
Offline
DevNet Resident
User avatar

Joined: Sat Jan 25, 2003 2:49 am
Posts: 1094


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 11, 2004 1:59 pm 
Offline
Forum Contributor

Joined: Mon Jun 21, 2004 7:05 pm
Posts: 194
Location: California
There is this one site, i came across that has phone number that shows which carrier from around the world.

THe only thing is in U.S. with the Number Portability just implemented, the site still has my number as AT&T though i switch to T-Mobile and ported my number too.

Anyway, i should be useful. I think numberplan.com is the place that sells the DB listing for all Telecom number assignment.

http://www.fonefinder.net is the site i am talking about.

I am currently wondering how to send vCard through SMS to a Cell Phone. I tried sending it as email with the vCard encoding but it just shows up as text.

Anyone know about this? Sites like http://www.vazu.com provides suck service but its USD$0.30 a contact.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 11, 2004 2:56 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 8:13 pm 
Offline
Forum Contributor

Joined: Tue May 25, 2004 4:28 pm
Posts: 234
wait does this work on my PERSONAL computer for FREE if i have php installed?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 01, 2004 4:35 pm 
Offline
Forum Contributor

Joined: Mon Jun 21, 2004 7:05 pm
Posts: 194
Location: California
The next best thing to finding a FREE sms sending provider is to find one that is supported by advertising.

Unfortunately, the majority of Free SMS sites only send Text based SMS. I require one that allow Binary encoded SMS, so i can encode my own messages. eg. vCard, vCal, OTA settings as well as normal text messages.

Regards
Mian


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 01, 2004 9:17 pm 
Offline
PHP Evangelist
User avatar

Joined: Tue Aug 13, 2002 3:35 pm
Posts: 3547
Location: Calgary, Canada


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 02, 2004 12:02 am 
Offline
Forum Contributor

Joined: Tue May 25, 2004 4:28 pm
Posts: 234
how does AOL work theres? Where it has 1 number, but u can reply to it and it still goes to the correct SN


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group