Skip to content

Instantly share code, notes, and snippets.

@MajideND
Created February 21, 2022 06:59
Show Gist options
  • Save MajideND/b3922bb7a7666bab4f1a1978e4fa092a to your computer and use it in GitHub Desktop.
Save MajideND/b3922bb7a7666bab4f1a1978e4fa092a to your computer and use it in GitHub Desktop.
<?php
function _getUserRealIP() {
$ipaddress = '';
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))
$ipaddress = $_SERVER['HTTP_CF_CONNECTING_IP'];
else
$ipaddress = 'UNKNOWN';
return $ipaddress;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment