title: How can I get the IP address and port of a client with PHP?
body: <p>How do I get the IP and port of a client with PHP?</p>
  
  <p>I tried the script below but it only gives me the IP address.</p>
  
  <pre><code>&lt;?php print $_SERVER['REMOTE_ADDR']; ?&gt;
  </code></pre>