What are the limitations of using IP addresses to track unique visits from mobile devices?

Using IP addresses to track unique visits from mobile devices can be unreliable due to factors such as dynamic IP addresses, shared IP addresses, and the use of proxies or VPNs. To overcome these limitations, it is recommended to use a combination of IP addresses and user-agent strings to track unique visits more accurately.

$ip_address = $_SERVER['REMOTE_ADDR'];
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$unique_identifier = md5($ip_address . $user_agent);

// Store the $unique_identifier in a database or session to track unique visits