发送短信 - IntelliSMS - fopen异常

时间:2011-03-08 00:02:38

标签: zend-framework sms sms-gateway

我正在尝试从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 Intellisms库。 你有什么主意吗?你知道如何使用Zend框架发送Post Request吗? 我试过了:

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

但没有任何事情发生:/

谢谢,

我的php.ini中有: allow_url_fopen =开启

1 个答案:

答案 0 :(得分:0)

我已经解决了。 可能我没有设置一个属性,这就是为什么它不起作用。 对不起,我不知道错误到底在哪里,我再次写了一遍,设置了一个属性,现在它正在工作。