title: PHP SoapClient request being received as client IP as opposed to server IP
body: <p>I'm trying to run a SOAP method on another domain which must be received from a whitelisted IP Address, but the WSDL seems to somehow think the request is coming from the client and not the server. The call collects information from a form, uses AJAX to post to a PHP function, which formats the fields into the API-friendly format, which is then sent via PHP SoapClient.</p>
  
  <p>I thought the best way to do this was to investigate the headers being sent with the SoapClient, but the headers don't list any IP address (Host, Connection, User-Agent, Content-Type, SOAPAction, and Content-Length).</p>
  
  <p>First, I read the documentation of the SOAP endpoint. It doesn't apparently specify any specific parameter to be passed, which wouldn't make sense anyway because I'd just be able to fake an IP address. Then, I read the documentation for <a href="http://php.net/manual/en/class.soapclient.php" rel="noreferrer">PHP SoapClient</a>. Interestingly I couldn't find quite where the IP addresses were set, but I did find a comment which mentions using <code>'stream_context'</code>, but had no luck with that either.</p>
  
  <p>I am also logging every request, including <code>$_SERVER['SERVER_ADDR']</code> and <code>$_SERVER['REMOTE_ADDR']</code>, which are both reporting IP addresses as expected; technical support on their end tell me that they are receiving requests from the <code>'REMOTE_ADDR'</code> value.</p>
  
  <p>I tried sending a bare-bones request and expected to get a different error besides the IP address, but I keep getting IP address problems.</p>
  
  <p>Is there any way I can be more sure that I am sending the SOAP request with the proper (server) IP?</p>