You can pass the thread context to your soapclient constructor, which has a set of binding parameters:
$opts = array( 'socket' => array( 'bindto' => '192.168.0.100:0', ), ); $ctx = stream_context_create($opts); $client = new SoapClient('the.wsdl', array('stream_context' => $ctx));
source share