Skip to content

Instantly share code, notes, and snippets.

@versionsix
Created February 5, 2017 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save versionsix/581ea6e1e2d8f8c2b761014eb4d1dae6 to your computer and use it in GitHub Desktop.
Save versionsix/581ea6e1e2d8f8c2b761014eb4d1dae6 to your computer and use it in GitHub Desktop.
<?php
if (getenv('HTTP_CLIENT_IP'))
echo "HTTP_CLIENT_IP: " . getenv('HTTP_CLIENT_IP') . "<br />";
if(getenv('HTTP_X_FORWARDED_FOR'))
echo "HTTP_X_FORWARDED_FOR: " . getenv('HTTP_X_FORWARDED_FOR') . "<br />";
if(getenv('HTTP_X_FORWARDED'))
echo "HTTP_X_FORWARDED: " . getenv('HTTP_X_FORWARDED') . "<br />";
if(getenv('HTTP_FORWARDED_FOR'))
echo "HTTP_FORWARDED_FOR: " . getenv('HTTP_FORWARDED_FOR') . "<br />";
if(getenv('HTTP_FORWARDED'))
echo "HTTP_FORWARDED: " . getenv('HTTP_FORWARDED') . "<br />";
if(getenv('REMOTE_ADDR'))
echo "REMOTE_ADDR: " . getenv('REMOTE_ADDR') . "<br />";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment