发送短信 - IntelliSMS - fopen 异常

发布于 2024-10-20 21:38:16 字数 1186 浏览 6 评论 0原文

我正在尝试从 Zend - PHP 中的控制器发送短信。我使用 IntelliSMS,但它的库中有例外:/ 例外:

    exception 'Exception' with message 'Problem making HTTP request
https://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx, fopen(https://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx) 
[function.fopen]: failed to open stream: Invalid argument' in C:\xampp\htdocs\Story\library\IntelliSMS\SendScripts\IntelliSMS.php:302 Stack trace: #0 
C:\xampp\htdocs\Story\library\IntelliSMS\SendScripts\IntelliSMS.php(199): IntelliSMS-
>MakeHTTPFormPost('https://www.int...', 'username=canib&...', 'Content-Type: a...') #1...

很奇怪,因为我可以通过以下方式发送短信:获取方法:

http://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx?username=MyUsername &password=MyPassword&to=44771012345,44771054321&text=TheMessage

但我不能使用这个 php Intelllisms 库。 你有什么想法吗?你知道如何使用 Zend 框架发送 Post 请求吗? 我已经尝试过:

     $request->getResponse()->setRedirect('http://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx?
username=xxx&password=xxx&to='.$number.'&text='.$text,302);

但什么也没发生:/

谢谢,

我的 php.ini 中有: 允许 url_fopen = 开

I am trying to send a sms from my Controller in Zend - PHP. I use IntelliSMS and I have exception in its library :/
The exception:

    exception 'Exception' with message 'Problem making HTTP request
https://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx, fopen(https://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx) 
[function.fopen]: failed to open stream: Invalid argument' in C:\xampp\htdocs\Story\library\IntelliSMS\SendScripts\IntelliSMS.php:302 Stack trace: #0 
C:\xampp\htdocs\Story\library\IntelliSMS\SendScripts\IntelliSMS.php(199): IntelliSMS-
>MakeHTTPFormPost('https://www.int...', 'username=canib&...', 'Content-Type: a...') #1...

It is strange because I can send this sms by: Get method:

http://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx?username=MyUsername &password=MyPassword&to=44771012345,44771054321&text=TheMessage

But I can not using this php Intellisms library.
Do You have any idea? Do You know how to send Post Request using Zend framework?
I have tried:

     $request->getResponse()->setRedirect('http://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx?
username=xxx&password=xxx&to='.$number.'&text='.$text,302);

But nothing happen :/

Thanks,

I have in my php.ini:
allow_url_fopen = On

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

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

发布评论

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

评论(1

烟酒忠诚 2024-10-27 21:38:16

我已经解决了。
可能我没有设置一项属性,这就是它不起作用的原因。
抱歉,我不知道到底错在哪里,我又写了一遍,又设置了一个属性,现在它可以工作了。

I have solved it.
Probably I didnt set one property that was why it wasnt working.
Sorry for it, I dont know where exactly was mistake, I wrote it once again, set one property more and now it is working.

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