So I’ve got a web application, let’s say with 2 sub domains a.domain.com and b.domain.com
If there is an update on “a” -they currently get an email, and have to sign in to the website and do something. Is there a way (maybe through Twilio??) that I could do this via SMS?
Basically:
1 – There’s a user update to “a.subdomain.com“
2 – The ‘owner’ of “a” gets an SMS asking for ‘yes’ or ‘no’ (the sms could be sent via PHP, or twilio perhaps?)
3 – The ‘owner’ replys ‘yes’ and This happens. if they reply ‘no’, nothing happens.
this is essentially a MySQL database change, changing a pst_stt to one of three values, and pst_dte to PHP’s date(Y-m-d) function.
I know I can send the text via SMS.
Is there a way to RECEIVE and do something if it’s received? All without “b.domain.com” being affected? something like, “a” set’s their phone number to be ‘555-5555’. That number get’s a text asking yes or no. They send yes ->
$text = (((the reply text received)));
$sender = (((the senders phone number)));
$phone = option('phone_number', 'options-page');
if($text == 'yes' && $sender === $phone){
/*Do the simple Database update*/
}
I don’t believe there is a way to receive SMS via php… so would something like Twilio do what I need?
Twilio can provide you with a telephone number to receive SMS messages.
So the user would reply to the SMS which your application will then process.
If you look at the guides on Twilio it should help you get a better idea:
https://www.twilio.com/docs/howto/sms-notifications-and-alerts
https://www.twilio.com/docs/quickstart
https://www.twilio.com/docs/quickstart/php/sms/hello-monkey
https://www.twilio.com/sms