Guest User

Untitled

a guest
Dec 4th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /**
  2.     * Fetches the IP address of the current visitor
  3.     *
  4.     * @return   string
  5.     */
  6.     function fetch_ip()
  7.     {
  8.         $ip = $_SERVER['REMOTE_ADDR'];
  9.  
  10.             if (isset($_SERVER['HTTP_CF_CONNECTING_IP']));
  11.                 {
  12.                     $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
  13.                 }
  14.             return $ip;
  15.     }
Add Comment
Please, Sign In to add comment