0

所以我想要的是。有一个表单,当我点击提交时,它会给我像这样的输出

http://www.mywebsite.com/testing?text='testing'&number=1234564

不是平常的

http://www.mywebsite.com/testing/key:value

它适用于 Kannel ,并且仅适用于 GET 表单。

更新

正如我提到的,现在 Kannel 在 GET 帖子中工作。但正如泰勒所说。它应该在幕后工作,这样没有人只是使用 SMS 功能并发送他们想要的任何内容。

这是它的工作原理,假设用户名是 tester,密码是 foobar(它在 smskannel.conf 文件中),这两行在 kannel 配置并在后台运行时发送短信(本地)

$url = "http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=0127715667&text='This is the Message'";
$urloutput=file_get_contents($url);
4

2 回答 2

1

您确定要允许您网站上的任何表单直接通过 Kannel 吗?

我建议将表单作为 POST 提交到您的应用程序,在操作中构建 URL,然后使用 Kannel 执行您想要执行的任何操作。(我对Kannel不是很熟悉)

于 2011-04-13T20:49:42.453 回答
1

你试过这个吗?

echo $form->create('Model',  array('type' => 'get'));

要转到另一个网站:

echo $form->create(Null, array('type' => 'get', 'url' => 'http://www.google.com/search'));

于 2011-04-13T21:48:03.290 回答