发送短信从数据库删除用户 Kannel

发布于 2024-10-18 03:42:23 字数 354 浏览 1 评论 0原文

我需要向我的应用程序发送一条短信,并根据文本执行操作。 现在我想在用户发送带有关键字“取消订阅”的短信时删除他/她。 我想将发件人的号码和文本捕获到我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

机场等船 2024-10-25 03:42:23

首先,您不应该从数据库中删除用户,您可以将他们标记为取消订阅,因为如果您遵循/代码订阅模型。同时发送关键字“UNSUBSCRIBE”应为“STOP”或“STOP ALL”(如果有多个订阅)。请注意,关键字“STOP”是运营商对所有订阅的强制要求。

至于解析传入的短信,您使用什么方法用 Kannel 发送? GSM 调制解调器?如果这是一个商业应用程序,我建议使用 SMS 聚合器,例如 OpenMarketTwilio

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文