发送短信从数据库删除用户 Kannel
我需要向我的应用程序发送一条短信,并根据文本执行操作。 现在我想在用户发送带有关键字“取消订阅”的短信时删除他/她。 我想将发件人的号码和文本捕获到我的 phpfile 中,该文件将执行删除操作。
这是我的短信服务配置
group = sms-service
keyword =
catch-all = true
post-url = "http://localhost/Maisha/Functions/receivesms.php?phone=%p&text=%S"
如何将我的值获取到我的 php 文件 (receivesms.php),然后根据号码删除相应的用户? 所有帮助将不胜感激。
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 do 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您不应该从数据库中删除用户,您可以将他们标记为取消订阅,因为如果您遵循短/长代码订阅模型。同时发送关键字“UNSUBSCRIBE”应为“STOP”或“STOP ALL”(如果有多个订阅)。请注意,关键字“STOP”是运营商对所有订阅的强制要求。
至于解析传入的短信,您使用什么方法用 Kannel 发送? GSM 调制解调器?如果这是一个商业应用程序,我建议使用 SMS 聚合器,例如 OpenMarket 或 Twilio。
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.