<?php  

if (!function_exists('str_contains')) {
    function str_contains (string $haystack, string $needle)
    {
        return empty($needle) || strpos($haystack, $needle) !== false;
    }
}

$user_agent = $_SERVER['HTTP_USER_AGENT'];

if ( str_contains(strtolower($user_agent), 'curl') ) {
	echo $_SERVER['REMOTE_ADDR'].'
';
} else {
	echo $_SERVER['REMOTE_ADDR'];
}
?>
