Send reg code via SMS
Moderator: General Moderators
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
Send reg code via SMS
I've searched the net on how to send a text message to a cell via SMS and I found the simplewire network but I can't use there network due to the fact that I need to use each carriers network so for example the user registers on my site and enters the 10 digit cell number and then there carrier and my script sends them a temp password to prove that its there phone they are registering with.. how would I do this?
First off, I know that on my cell phone you can't send from provider to another provider without knowing the "e-mail" for that cell phone. I think every cell phone that receives SMS messages has an e-mail from the service provider?
So if you know the e-mail suffix for each carrier, and if you know the syntax for their e-mail addresses (xxxyyyzzzz@sms.cellprovider.com) you could set it up so it changes their cell phone number into the correct format and adds the e-mail suffix for each provider... the problem is you have to know the correct syntax and suffix for -every- provider that the user might put in
Hope this helps somewhat, perhaps another user has a brilliant idea!
So if you know the e-mail suffix for each carrier, and if you know the syntax for their e-mail addresses (xxxyyyzzzz@sms.cellprovider.com) you could set it up so it changes their cell phone number into the correct format and adds the e-mail suffix for each provider... the problem is you have to know the correct syntax and suffix for -every- provider that the user might put in
Hope this helps somewhat, perhaps another user has a brilliant idea!
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
did you look at Hotscript.com Found some SMS things there that may be useful!
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
I did this...if you want to use it go ahead works pretty good
Code: Select all
<?php
//Created by Mike L.
//Filename: sms.php
//can only be include and not ran on own
if(eregi("sms.php",$PHP_SELF)) exit();
?>
<SCRIPT LANGUAGE="JavaScript">
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
</script>
<?
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) == 0)
{
echo "No Message was entered please try again.<p>\n\n";
}
else
{
mail($smsto, $subject, $message, "From: $from") or die("Unable to send your message. Please try again later.");
echo "Your message has been sent.<p>\n\n";
}
}
?>
<form method="post" align="center" action="<?php echo $PHP_SELF; ?>">
<input type=hidden name=action value=send>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td><b>Number:</b></td><td valign="top" align=left><input type="text" name=number size=43></td></tr>
<tr><td><b>Service:</b></td><td valign="top" align=left><select name=service ><option value="att">AT&T Wireless<option value="cingular">Cingular<option value="nextel">Nextel<option value="qwest">Qwest Wireless<option value="sprintpcs">Sprint PCS<option value="t-mobile">T-Mobile<option value="verizon">Verizon<option value="voicestream">VoiceStream</select></td></tr>
<tr><td><b>From:(name@website.com)</b></td><td valign="top" align=left><input type="text" name=from size=43></td></tr>
<tr><td><b>Message:</b></td><td valign="top"><textarea name=message rows=10 cols=40 onKeyDown="textCounter(this.form.message,this.form.remLen,130);" onKeyUp="textCounter(this.form.message,this.form.remLen,130);"></textarea></td></tr>
<tr><td><b>Characters left:</b></td><td valign="top" align=left><input readonly type=text name=remLen size=3 maxlength=3 value="130"></td></tr>
<tr><td valign="top" align=left></td><td valign="top" align=left><INPUT TYPE="submit" width=84 height=15 border=0 value="Send Message" ></td></tr>
</table>
</form>-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
it doesnt work with all carriers all but cricket in the US basically its
$number @ carrierswebsiteforsms.com
ist just a small email
im 99.9% sure you cant send it using the mail function you have to use a gateway for that ...and it costs about 5cents a sms message (thats billed to you not the phone users)
$number @ carrierswebsiteforsms.com
ist just a small email
im 99.9% sure you cant send it using the mail function you have to use a gateway for that ...and it costs about 5cents a sms message (thats billed to you not the phone users)
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
I was planning on offering this service for free, If its going to cost me money to send them somehting for free I might want to re think my idea.. lol
I tried something just for kicks.. I have an e-mail for my fone.. xxxxxxxxxx@email.uscc.net and I tried to send a midi file using outlook to my cell phone and my phone got it no problem.. So do you think that I could just do the same with mail function?
I tried something just for kicks.. I have an e-mail for my fone.. xxxxxxxxxx@email.uscc.net and I tried to send a midi file using outlook to my cell phone and my phone got it no problem.. So do you think that I could just do the same with mail function?
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
A gateway? As in sending e-mails that forward to the phone? (sorry, I'm not always on the smart side)
It's free for anyone to send me text messages (to my phone) via the internet
http://sms.alaskadigitel.com/ and if you login to hotmail you can send them straight to my phone too 
It's free for anyone to send me text messages (to my phone) via the internet