从PHP发送短信 [英] Sending SMS from PHP

查看:86
本文介绍了从PHP发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从用PHP编写的Web服务器发送短信?

How to send an SMS from a web server written in PHP?

推荐答案

Clickatell 是一个受欢迎的SMS网关.它可以在200多个国家/地区使用.

Clickatell is a popular SMS gateway. It works in 200+ countries.

他们的API通过以下方式提供连接选项:HTTP/S,SMPP,SMTP,FTP,XML,SOAP.这些选项中的任何一个都可以从php使用.

Their API offers a choice of connection options via: HTTP/S, SMPP, SMTP, FTP, XML, SOAP. Any of these options can be used from php.

HTTP/S方法非常简单:

The HTTP/S method is as simple as this:

http://api.clickatell.com/http/sendmsg?to=NUMBER&msg=Message+Body+Here( Clickatell API指南)

SMTP方法包括将纯文本电子邮件发送到sms@messaging.clickatell.com,并具有以下正文:

The SMTP method consists of sending a plain-text e-mail to: sms@messaging.clickatell.com, with the following body:

user: xxxxx
password: xxxxx
api_id: xxxxx
to: 448311234567
text: Meet me at home

您还可以从浏览器免费测试网关(传入和传出):"测试SMS网关".

You can also test the gateway (incoming and outgoing) for free from your browser: "Test SMS Gateway".

这篇关于从PHP发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆