The Global Function is $_SERVER['REMOTE_ADDR'] in Example :- <?php echo $_SERVER['REMOTE_ADDR']; ?> it's very simple example & simple Global Function For Beginners .
You need to make sure your terminology is correct. This is not a Global Function! $_SERVER is a SUPERGLOBAL variable. This variable happens to be an array in this case.
If you are storing $_SERVER["REMOTE_ADDR"] into database, you have to filter the google analytics ip address.