Created
          September 13, 2012 14:28 
        
      - 
      
- 
        Save jimmysawczuk/3714656 to your computer and use it in GitHub Desktop. 
    grab IP
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function getIP() | |
| { | |
| return !empty($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER["HTTP_X_FORWARDED_FOR"] | |
| : ( | |
| !empty($_SERVER['REMOTE_ADDR'])? $_SERVER['REMOTE_ADDR'] | |
| : '' | |
| ); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment