What are the implications of using Flash intros on mobile devices when redirecting from index.php to home.html in PHP?

Using Flash intros on mobile devices can lead to a poor user experience as Flash is not supported on many mobile browsers. To solve this issue, you can detect if the user is accessing the website from a mobile device and redirect them directly to the home page without loading the Flash intro.

<?php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($user_agent, 'Mobile') !== false) {
    header('Location: home.html');
    exit();
} else {
    header('Location: index.php');
    exit();
}
?>