Do you know how to get local IP address using PHP?

Do you know how to get local IP address using PHP?

The answer is here. :lol:


<?php
  echo sprintf('Local IP address: %s', gethostbyname($_SERVER_NAME));
?>

print $_SERVER['SERVER_ADDR'];