如何设计短信服务?

发布于 2024-07-14 04:56:28 字数 215 浏览 9 评论 0原文

我想设计一个可以发送和接收短信的网站。

  1. 我应该如何处理这个问题?
  2. 有哪些可用资源?
  3. 我知道 php、python 我还需要什么或者有更好的选择吗?
  4. 如何仅使用我的电脑进行实验?[像本地主机之类的东西]
  5. 有哪些好的托管服务? [编辑]
  6. [添加更多你能想到的问题?]

I want to design a website that can send and receive sms.

  1. How should I approach the problem ?
  2. What are the resources available ?
  3. I know php,python what else do I need or are the better options available?
  4. How can experiment using my pc only?[somthing like localhost]
  5. What are some good hosting services for this? [edit this]
  6. [Add more questions you can think of?]

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

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

发布评论

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

评论(5

瑾夏年华 2024-07-21 04:56:28

您可以查看Kannel。 使用它创建短信服务非常简单。 只需定义一个关键字,然后输入传入 SMS 请求将路由到的 URL(您将在查询字符串参数中获得手机号码和 SMS 文本等信息),然后您的 Web 脚本生成任何输出(您可以使用任何网络脚本/语言/平台)都将被发送回发件人。

测试起来很简单。 您可以使用自己的 PC,只需使用 fakesmsc“短信中心”,然后向其发送 HTTP 请求即可。 如果您有 GSM 调制解调器,您也可以使用调制解调器的 AT 命令集。

You can take a look at Kannel. It's so simple to create SMS services using it. Just define a keyword, then put in the URL to which the incoming SMS request will be routed (you'll get the info such as mobile number and SMS text in query string parameters), then whatever output your web script generates (you can use any web scripting/language/platform) will be sent back to the sender.

It's simple to test. You can use your own PC and just use the fakesmsc "SMS center" and just send it HTTP requests. If you have a GSM modem you can use that too, utilising the modem's AT command set.

老旧海报 2024-07-21 04:56:28

首先,您需要注册一个帐户(短信网关),其中大多数还为您提供了如何使用其 API 发送和接收短信的示例代码。 然后,您将围绕您的站点逻辑包装短信功能。

例如 http://www.clickatell.com/developers/php.php

First thing, You need to sign up for an account (SMS gateway), most of them also give you example code how to send and receive sms using their API. Then you will wrap the the sms functionality around your sites logic.

e.g http://www.clickatell.com/developers/php.php

神魇的王 2024-07-21 04:56:28

我从我给出的与相关的答案复制了此内容="https://stackoverflow.com/questions/432944/sms-from-web-application/">这个问题。 不过,除了下面的文字外,您还可以查看 Wadja 的短信网关 优惠 (API 链接)...它们目前看来是一个非常好的选择,尽管我个人还没有使用过它们。

发送 SMS 消息的主要选项是使用现有的 SMS 提供商。 根据我的经验(在短信 Web 应用程序方面拥有丰富的经验),您经常会发现与不同的提供商谈判是为您的应用程序获得最佳交易的最佳方式。

不同的提供商通常提供不同的服务和不同的功能。 我最喜欢的提供商,事实上,过去曾愉快地与我协商降低费率的提供商是 TM4B (http:// /www.tm4b.com)。 这些人的价格非常优惠,覆盖全球大部分地区,并且拥有出色的客户服务。

下面是从我的一个实时 Web 应用程序中提取的一些代码(以及一些经过混淆的部分),用于通过其 API 发送一条简单的消息:

require_once("tm4b.lib.php");
$smsEngine = new tm4b();

// Prepare the array for sending
$smsRequest["username"] = "YOURUNAME";
$smsRequest["password"] = "YOURPWORD";
$smsRequest["to"] = "+441234554443";
$smsRequest["from"] = "ME!";
$smsRequest["msg"] = "Hello, test message!";

// Do the actual sending
$smsResult = $smsEngine->ClientAPI($smsRequest);

// Check the result
if( $smsResult['status'] == "ok" ) {
    print "Message sent!";
} else {
    print "Message not sent.";
}

我过去使用过的许多其他提供商都有非常相似的界面,而且在定价方面都非常有竞争力。 您只需四处寻找适合您需求的提供商即可。

就成本而言,大多数西方国家的价格从几便士/美分不等(不过,大多数第三世界国家的价格要高一些,所以要小心)。 如果您想从大多数供应商那里获得体面的价格,您将不得不批量付款,但他们通常会与您协商“比平常少”的批次。 大多数提供商确实提供后付款选项,但只有当您成功完成与他们的几笔交易时...其他提供商从一开始就提供后付款选项,但价格过高。

希望能帮助到你!

I've copied this from an answer I gave in relation to this question. However, in addition to the text below, take a look at Wadja's SMS Gateway deals (API link)... they appear to be a really good option at the moment, though I've not used them, personally.

Your main option for sending SMS messages is using an existing SMS provider. In my experience (which is extensive with SMS messaging web applications), you will often find that negotiating with different providers is the best way to get the best deal for your application.

Different providers often offer different services, and different features. My favourite provider, and indeed, the one that has happily negotiated with me for lower rates in the past, is TM4B (http://www.tm4b.com). These guys have excellent rates, cover a huge proportion of the globe, and have excellent customer service.

Below is some code extracted (and some parts obfuscated) from one of my live web applications, for sending a simple message via their API:

require_once("tm4b.lib.php");
$smsEngine = new tm4b();

// Prepare the array for sending
$smsRequest["username"] = "YOURUNAME";
$smsRequest["password"] = "YOURPWORD";
$smsRequest["to"] = "+441234554443";
$smsRequest["from"] = "ME!";
$smsRequest["msg"] = "Hello, test message!";

// Do the actual sending
$smsResult = $smsEngine->ClientAPI($smsRequest);

// Check the result
if( $smsResult['status'] == "ok" ) {
    print "Message sent!";
} else {
    print "Message not sent.";
}

Many other providers that I've used in the past, have very similar interfaces, and all are really competitive when it comes to pricing. You simply have to look around for a provider that suits your needs.

In regard to cost, you're looking at prices ranging from a few pence/cents for most Western countries (prices are a little bit higher for most third-world countries, though, so beware). Most providers you will have to pay in bulk, if you want decent rates from them, but they'll often negotiate with you for 'smaller-than-usual' batches. Most providers do offer a post-pay option, but only when you've successfully completed a few transactions with them... others offer it from the start, but the prices are extortionate.

Hope it helps!

生生漫 2024-07-21 04:56:28

您需要一个短信服务器。 应该可以帮助您入门。

You need a SMS server. This should get you started.

红颜悴 2024-07-21 04:56:28

由于我的公司有时会这样做(文字促销等,尽管我们的主要重点是低得多的水平),我认为我应该参与其中。

到目前为止,最简单的方法是使用诸如 Clickatell,提供 HTTP API、FTP 和 SMPP 等。 不过,我不知道 Clickatell 如何处理接收消息,因为我们为此使用直接 SMPP 绑定到本地移动运营商。

如果您愿意付费,您应该能够将 SMPP 绑定到当地的移动运营商,但通常价格昂贵。 这还允许您购买自己的短代码

您可能还想提供 mBloxNextcell 一看。 快速 Google 搜索将会发现更多内容。

您还可以购买 GSM 调制解调器,它可以让您像平常使用手机一样发送和接收消息,但通过 PC 除外。 这通常意味着您将用手机支付任何费用。 (无论如何在爱尔兰)

Since my company does this sometimes (text promotions etc, though our main focus is much much lower level stuff), I figured I should pitch in.

By far the simplest way is to use a service such as Clickatell, which provides a HTTP API, as well as FTP and SMPP amongst others. I don't know how Clickatell deals with receiving messages, however, as we use direct SMPP binds to our local mobile operators for this.

If you are willing to pay for it, you should be able to get an SMPP bind to your local mobile operator, but its often expensive. This would also allow you to purchase your own shortcode.

You may also want to give mBlox or Nextcell a look. A quick Google search will turn up more.

you could also buy a GSM modem, which would allow you to send and receive messages as you normally would with a phone, except through a PC. This usually means you will pay whatever you would with a phone. (In Ireland anyway)

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