How can PHP code check if a visitor's browser supports Java, Real, and Flash?

To check if a visitor's browser supports Java, Real, and Flash, you can use PHP to detect the user agent string and then check for specific keywords related to these technologies. You can use the $_SERVER['HTTP_USER_AGENT'] variable to access the user agent string and then use strpos() function to search for keywords like "Java", "RealPlayer", and "Shockwave Flash".

$user_agent = $_SERVER['HTTP_USER_AGENT'];

if(strpos($user_agent, 'Java') !== false){
    echo 'Java is supported';
}

if(strpos($user_agent, 'RealPlayer') !== false){
    echo 'RealPlayer is supported';
}

if(strpos($user_agent, 'Shockwave Flash') !== false){
    echo 'Flash is supported';
}