使用 Kannel 发送短信需要什么?
我希望能够使用 PHP 从 Linux 发送短信。 我已经阅读并安装了 Kannel,一个免费的 SMS 网关。 当我尝试使用 HTTP 接口时,它不会发送消息。 我是否需要其他东西来通过 kannel 发送短信,例如调制解调器?
I want to be able to send text messages from Linux with PHP. I've read about and installed Kannel, a free SMS gateway. When I try to use the HTTP interface, it won't send a message. Do I need something else to send text messages via kannel, like a modem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您需要本地移动网络提供商提供的 GSM 调制解调器和 SIM 卡。
要设置 GSM 调制解调器,您可以使用
wvdialconf
自动检测其设置。 输出包含相关信息,例如波特率、使用哪个串行端口以及调制解调器的初始化字符串。要测试调制解调器是否正常工作,您可以使用
minicom
。 Minicom 充当任何串行设备(在本例中为 GSM 调制解调器)的终端,通过它,您可以发送 AT 命令到您的调制解调器。Yes, you need a GSM modem and a SIM card from your local mobile network provider.
To setup your GSM modem, you can auto-detect its settings using
wvdialconf
. The output contains pertinent information such as Baud rate, which serial port is used, and the modem's initialization string.To test that your modem works properly, you can use
minicom
. Minicom acts as a terminal to any serial device (in this case, a GSM modem) and, with it, you can send AT commands to your modem.我不知道这是否是一个解决方案,但是 Clickatell 提供了一个非常易于使用的 HTML api,用于在任何地方发送短信在世界上。 我已经使用它们好几年了。 您只需为您发送的短信付费。
I dont know if this is a solution, but Clickatell provides a very easy to use HTML api for sending sms messages anywhere in the world. I'v been using them for several years. You only pay for the sms messages you send.