开发者

Send sms to delete user from database Kannel

I need to send an sms to my application and based on the text, do an action. Now I want to delete a user when he/she sends an sms with the keyword UNSUBSCRIBE. I want to capture the number of the sender and the text to my phpfile which will d开发者_如何学运维o the delete action.

here is my sms-service configuration

group = sms-service
keyword = 
catch-all = true
post-url = "http://localhost/Maisha/Functions/receivesms.php?phone=%p&text=%S"

How do I get my values to my php file (receivesms.php) then delete the appropriate user based on their number? All help will be appreciated.


First you should not delete the user from your database, you might flag them as unsubscribed as they could have more than one subscription if you follow the Short/Long Code subscription model. Also send the keyword 'UNSUBSCRIBE' should be 'STOP' or 'STOP ALL' (if more than one subscription). Note the keyword 'STOP' is a carrier mandate for all subscription.

As for parsing out the incoming sms, what method are you using to send with Kannel? GSM Modem? If this is a business application I would suggest going with a SMS Aggregator like OpenMarket or Twilio.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜