Jump to content

Notify via SMS (text message)


miniu

Recommended Posts

Ok I found it.

 

for example:

 

[email protected]

 

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.

Ok I found it.

 

for example:

 

[email protected]

 

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.

 

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 [email protected] and the second goes to [email protected]

 

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

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");

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.