title: Unable to get LOCAL IP address of a machine from a site which is hosted on GODADDY
body: <p>Hai I am trying to get local IP address of the machine where the our internal portal got accessed from, i need the IP <strong>192.168.xx.xx</strong>, I tried using may solutions like </p>
  
  <pre><code>$myIp = getHostByName(getHostName());    
  $_SERVER['REMOTE_ADDR']     
  $_SERVER['REMOTE_HOST']
  
  function getLocalIP(){
      exec("ipconfig /all", $output);
          foreach($output as $line){
              if (preg_match("/(.*)IPv4 Address(.*)/", $line)){
                  $ip = $line;
                  $ip = str_replace("IPv4 Address. . . . . . . . . . . :","",$ip);
                  $ip = str_replace("(Preferred)","",$ip);
              }
          }
      return $ip;
  }
  </code></pre>
  
  <p>and even some more solutions from references </p>
  
  <p><a href="https://stackoverflow.com/questions/9905650/how-do-i-get-the-local-ip-address-of-the-server-using-php">How do I get the local IP address of the server using PHP?</a> ,
  <a href="https://stackoverflow.com/questions/40670895/how-to-get-local-computer-ip-address-in-php">how to get local computer ip address in php</a> ,
  <a href="https://stackoverflow.com/questions/39684098/get-local-machine-ip-address-in-php">Get Local Machine IP Address in PHP</a></p>
  
  <p>But nothing works to get the desired solution? any suggestions?</p>