Inadequate planning on your part does not necessarily constitute a crisis for us
Synopsis:

$_SERVER is an array containing information such as headers, paths, and script locations.
REMOTE_ADDR -- The IP address from which the user is viewing the current page.
getenv -- Gets the value of an environment variable
Output:

$_SERVER['REMOTE_ADDR']: 38.107.179.228
getenv('REMOTE_ADDR'): 38.107.179.228
&REMOTE_ADDR: Will not display as registered globals are turned off on http://unix.cms.gre.ac.uk

Code:

<?php
  echo "$_SERVER['REMOTE_ADDR']: ". $_SERVER['REMOTE_ADDR'] ."<br />";
  echo "getenv('REMOTE_ADDR'): ". getenv('REMOTE_ADDR') ."<br />";
  echo "&REMOTE_ADDR: ". $REMOTE_ADDR  ."<p />";
?>


Back to code examples : [code examples]
University of Greenwich, a charity and company limited by guarantee,
registered in England (reg no. 986729). Registered Office: Old Royal
Naval College, Park Row, Greenwich SE10 9LS.