Update Ip.php

Better compatibility by checking more possible server headers for the users's IP address. Refactored code. Reworked algorithms.