IP address can be easily spoofed. It can come from behind a proxy server. CloudFlare like proxies can be involved. Localhost can return invalid IP address. So, if you want to validate an IP address, use the below script. <?php/** * To validate if an IP address is both a valid and...