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? Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/ Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 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. Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032731 Share on other sites More sharing options...
mmarif4u Posted March 27, 2010 Share Posted March 27, 2010 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. Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032736 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? Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032741 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) Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032745 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 Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032746 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. Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032747 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 [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. Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032748 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 .... Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032749 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"); Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032753 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? Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032754 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 Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032758 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? Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032760 Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 Yup. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032765 Share on other sites More sharing options...
miniu Posted March 27, 2010 Author Share Posted March 27, 2010 ok, thank you Link to comment https://forums.phpfreaks.com/topic/196705-notify-via-sms-text-message/#findComment-1032773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.