How to get the client IP address in PHP The Problem You have a PHP application and want to keep track of visitors to analyze your traffic or for customization or security purposes.