miniu Posted March 27, 2010 Share Posted March 27, 2010 I have a notify of changes by e-mail, but I would like to send them also a notification via text message, is there any possibility to do that? Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted March 27, 2010 Share Posted March 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 I was thinking that the first digits depending of the state and not the provider? How can I define the providers? which numbers are those providers numbers in the cell phone number? Quote Link to comment Share on other sites More sharing options...
tomfmason Posted March 27, 2010 Share Posted March 27, 2010 instead of reinventing the wheel I would use a third party api like http://www.zeepmobile.com/ (free but ad supported) Quote Link to comment Share on other sites More sharing options...
tomfmason Posted March 27, 2010 Share Posted March 27, 2010 even better - http://www.udefn.com/pub/api.aspx Quote Link to comment Share on other sites More sharing options...
inversesoft123 Posted March 27, 2010 Share Posted March 27, 2010 I use database and for sms request I use curl. Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 I use database and for sms request I use curl. how you define the service providers like AT&T Verizon .... Quote Link to comment Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 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"); Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 Thank you but how is this code getting the information from the users cellphone number? How does it know that this number is a AT&T number or T-Mobile number? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 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 Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 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? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 Yup. HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 ok, thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.