发送短信 - IntelliSMS - fopen 异常
我正在尝试从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经解决了。
可能我没有设置一项属性,这就是它不起作用的原因。
抱歉,我不知道到底错在哪里,我又写了一遍,又设置了一个属性,现在它可以工作了。
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.