2013-05-21 12:43
浏览 109


I'm trying to open a socket between my server and the other server, but it returns the following warring msg :

SoapClient::SoapClient() [soapclient.soapclient]: failed to open stream: HTTP request failed

my SoapClient should be connected using a specific IP, so I'm using the following code:

$aOpts = array('socket' => array('bindto' => 'my IP')); $rStreamContext = stream_context_create($aOpts);

$client = new SoapClient($this->_wsdl_test_url, array('stream_context'=>$rStreamContext));

the server keep giving me the same warning, failed to open stream: HTTP

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douchuilai2355 2013-05-21 13:02

    finally it was fixed, the problem was with the encryption of the file, I put it UTF8 without BOM instead of UTF8

    点赞 打赏 评论

相关推荐 更多相似问题