如何从我的网站发送短信?只需要发送短信,不需要接收

发布于 2024-11-16 12:45:22 字数 1539 浏览 12 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

一指流沙 2024-11-23 12:45:22

答案 1:这是一个非常好的短信 API:http://www.clockworksms.com/

答案 2:
这不是一个 API 解决方案,而是更多地概述了如何使用 PHP5 轻松构建自己的解决方案。要将短信发送到手机,您只需将消息通过电子邮件发送到电话号码即可。电子邮件地址只是电话号码和运营商域。

  1. 确定运营商
  2. 确定运营商的域
  3. 构建电子邮件地址
  4. 发送电子邮件

确定运营商
运营商可以通过区号和前 3 个数字来确定。我根本不知道有任何 API(不过我确信它们存在),但如果您想采用自定义路线,您可以构建自己的 API。例如,此站点有一个输入,您可以在其中确定 carreir: http://www .telcodata.us/search-area-code-exchange-detail

但它只是发布数据,因此您可以通过传递自己的参数来计算。例如:ww.telcodata.us/search-area-code-exchange-detail?npa=323&exchange=249

确定域
每个运营商都有自己的文本域。例如,AT&T 是@txt.att.net,而Verizon 是@vtext.com。

以下是运营商域的列表:http://www.emailtextmessages.com/

构建电子邮件< /强>
示例:如果 AT&T 号码为 (510) 123-4567,您可以通过发送电子邮件 [电子邮件受保护]

Answer 1: This is a pretty nice sms API: http://www.clockworksms.com/

Answer 2:
This isn't an API solution, but more of an overview how you can quite easily build your own solution with PHP5. To send an sms to a phone, all you have to do is email the message to the phone number. The email address is just the phone number and carrier domain.

  1. Determine Carrier
  2. Determine domain for carrier
  3. Construct email address
  4. Send email

Determine Carrier
The carrier can be determined by the area code and first 3 numbers. I don't know any APIs off the top of my head (I'm sure they exists though), but if you wanted to go the custom route you can sort of build your own. For example, this site has an input where you can determine carreir: http://www.telcodata.us/search-area-code-exchange-detail

But it's just posting the data, so you can figure it out by passing your own parameters. for example: ww.telcodata.us/search-area-code-exchange-detail?npa=323&exchange=249

Determine Domain
Each carrier has their own domain for text. For example, AT&T is @txt.att.net while Verizon is @vtext.com.

Here is a list of carrier domains: http://www.emailtextmessages.com/

Construct Email
Example: if an AT&T number is (510) 123-4567 you can send an sms to the number by emailing [email protected].

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