What are some alternative methods to identify browsers in PHP without relying on user agent strings?

User agent strings can be unreliable and easily manipulated, so it's important to find alternative methods to identify browsers in PHP. One way to do this is by using feature detection, which involves checking for specific browser capabilities or behaviors instead of relying on the user agent string.

<?php
function is_chrome() {
    if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false){
        return true;
    } else {
        return false;
    }
}

if(is_chrome()){
    echo "User is using Chrome browser.";
} else {
    echo "User is not using Chrome browser.";
}
?>