Go to this link and download script from GitHub and extract files into www or htdocs and remove all files and directories and only keep Mobile.detect.php file
Create index.php file and copy demo file and past into index.php from here
fix to include path for the library Mobile.detect.php to the right path and remove unneeded dots ../
Open the browser and Go to localhost/the script directory.
and that is it, it will run successfully, also you can see demo link below with all steps in the video, thank you, see you next