Jump to content

Notify via SMS (text message)


miniu

Recommended Posts

Ok I found it.

 

for example:

 

2672220000@txt.att.net

 

So it will be send as an e-mail just add the number of the person and then the service provider and it works. Now I have to figure it out how to add the service provider automatically to the e-mail, because they will only provide me with the cell phone number. 

 

If someone know, please let me know.

Link to comment
Share on other sites

Ok I found it.

 

for example:

 

2672220000@txt.att.net

 

So it will be send as an e-mail just add the number of the person and then the service provider and it works. Now I have to figure it out how to add the service provider automatically to the e-mail, because they will only provide me with the cell phone number. 

 

If someone know, please let me know.

 

Every cell phone company have different numbers start with. For example, 1st three digits 015, match that numbers with the service provider. Save it in database or your script. and use if statement to send different sms using different service providers.

 

Link to comment
Share on other sites

looks good, but there will be no sms panel on the website. My users receiving right now e-mail notification but in they profiles they providing me also with they cell phone number and I want to use just that number for example $cellphone to send this notification by e-mail and also by sms. So he will receive for example two message one goes ro user@usermail.com and the second goes to phonenumber@cellphoneprovider.com

 

So I will not use a text form, it is just to use it for notify.

Link to comment
Share on other sites

This is what I made for a base to send weather SMS's. Not really much to it.

 

$from = $_POST['from'];
$to = $_POST['to'];
$carrier = $_POST['carrier'];
$message = stripslashes($_POST['message']);

$headers = "From: $from\r\n";

if ($carrier == "verizon") {
$send = $to."@vtext.com";
}

if ($carrier == "tmobile") {
$send = $to."@tomomail.net";
}

if ($carrier == "sprint") {
$send = $to."@messaging.sprintpcs.com";
}

if ($carrier == "att") {
$send = $to."@txt.att.net";
}

if ($carrier == "virgin") {
$send = $to."@vmobl.com";
}

if ($carrier == "alltel") {
$send = $to."@message.alltel.com";
}

mail("$send", "Weather Widget SMS", "$message", "$headers");

Link to comment
Share on other sites

You have to ask for that when you get the number. There is no sure way to tell the provider by just the phone number due to number portability, local/regional cell providers and major acquisitions and territory swaps.

 

 

HTH

Teamatomic

 

so you suggest that I should also ask the user to add the provider too?

Link to comment
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.