SERVER PORT server variable - how to find hosting server's port no in php

SERVER_PORT server variable - how to find hosting server's port no in php

how-to-find-hosting-server-port-in-php.php


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>SERVER_PORT server variable - how to find hosting server's port no in php</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="Author" content="Md Iqbal Hosan">
  <meta name="title" content="SERVER_PORT server variable - how to find hosting server's port no in php">
  <meta name="keywords" content="php, example, code, array, function, money_format, string, SERVER_PORT, server variable, port">
  <meta name="description" content="SERVER_PORT server variable - how to find hosting server's port no in php">
  <style>
   h2, h4{background:#ccc; color:#000085;}
   h2{ padding:3px; margin:3px; font-size:20px;}
   h4{ padding:2px; margin:2px; font-size:17px;}
   p{padding:2px; margin:2px; color:#0099dd;}
   body{ background:#FFFFFc;}
  </style>
 </head>
 <body>
  <h2>SERVER_PORT server variable - how to find hosting server's port no in php</h2>
  <pre>
   <?php
    /*
     ---------------------------------------------------------
     we want to find hosting server's port no
     we can do this by using SERVER_PORT server variable in php
     ---------------------------------------------------------
    */
    echo "<h4>hosting server's port no by using SERVER_PORT server variable</h4>";
    echo $_SERVER['SERVER_PORT'];
    /*
     -----------------------------------------------------------
     in professional programming it is used rapidly.
     -----------------------------------------------------------
    */
   ?>
  </pre>
 </body>
</html>

SERVER_PORT server variable - how to find hosting server's port no in php - output in the browser

No comments:

Post a Comment

leave your comments here..