Skip to content

Instantly share code, notes, and snippets.

@JacquesInnocent
Created June 5, 2018 01:29
Show Gist options
  • Save JacquesInnocent/dcb95456725da770888860a7afdc119e to your computer and use it in GitHub Desktop.
Save JacquesInnocent/dcb95456725da770888860a7afdc119e to your computer and use it in GitHub Desktop.
Snippet for retrieving user's IP address in PHP.
public function UserIP() {
$ip_address = $_SERVER['REMOTE_ADDR'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment