2010-08-09 14 views

Répondre

5

Vous pouvez passer un contexte de flux à votre constructeur soapclient qui a un choix de BindTo Set:

$opts = array(
    'socket' => array(
     'bindto' => '192.168.0.100:0', 
    ), 
); 

$ctx = stream_context_create($opts); 

$client = new SoapClient('the.wsdl', array('stream_context' => $ctx)); 
+0

Wow, simple. Merci! – hobodave