Add conditional check for $ip_addresses[] = $_SERVER['REMOTE_ADDR'];