Browser detector script in PHP

Download
Download is available until [expire_date]
  • Version
  • Download 120
  • File Size 396.02 KB
  • File Count 1
  • Create Date September 5, 2016
  • Last Updated September 5, 2016

Browser detector script in PHP

Browser detector script in PHP

Simple program in PHP that will determine what type of browser you are using.

PHP Script:

< ?php
		if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
		   echo 'You are now using Internet explorer';
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE) //For Supporting IE 11
		    echo 'You are now using Internet explorer';
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE)
		   echo 'You are now using Mozilla Firefox';
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE)
		   echo 'You are now using Google Chrome';
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== FALSE)
		   echo "You are now using Opera Mini";
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== FALSE)
		   echo "You are now using Opera";
		elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== FALSE)
		   echo "You are now using Safari";
		else
		   echo 'You are now using Something else';
? >
, , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.