title: How can I use specific outgoing IP for fsockopen in PHP?
body: <p>I should use IP from </p>
  
  <p>gethostbyaddr($_SERVER['SERVER_ADDR']);</p>
  
  <p>In <em>fsockopen</em> as outgoing.</p>
  
  <p>I have a construction like this:  </p>
  
  <pre><code>if ($this-&gt;sock = fsockopen($host, $this-&gt;port, $errno, $errstr, (float) $timeout)) {}
  </code></pre>
  
  <p>Is there a way to do so without changing whole code?
  If no, please advise to me the shortest way to do so.</p>