Skip to content

Instantly share code, notes, and snippets.

@chrisvasey
Created October 23, 2018 14:49
Show Gist options
  • Save chrisvasey/58987e28c59b2d5e9fc49f28bc415fee to your computer and use it in GitHub Desktop.
Save chrisvasey/58987e28c59b2d5e9fc49f28bc415fee to your computer and use it in GitHub Desktop.
<?php
$IP = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment