<?php
/* **************************** browser filtering page **************
** this page filters browser that are not allowed in the cms**********
** *********************************************************************
*/


  
  $viewer = $_SERVER["HTTP_USER_AGENT"];
  

   
   
   //$browser = "An unidentified browser";
   
   if( preg_match( "/\bMSIE\b/i", "$viewer" ) )
   {
      $browser = "Internet Explorer";
   }
   else if(  preg_match( "/\bNetscape\b/i", "$viewer" ) )
   {
      $browser = "Netscape";
   }
   else if(  preg_match( "/\bMozilla\b/i", "$viewer" ) )
   {
      $browser = "Mozilla";
   }
   else if(  preg_match( "/\bFirefox\b/i", "$viewer" ) )
   {
      $browser = "Firefox";
   }
    else if(  preg_match( "/\bChrome\b/i", "$viewer" ) )
   {
      $browser = "Chrome";
   }
   
   
   
   if( preg_match( "/Windows/i", "$viewer" ) )
   {
      $platform = "Windows!";
   }
   else if ( preg_match( "/Linux/i", "$viewer" ) )
   {
      $platform = "Linux!";
   }
  
 //echo("You are using $browser on $platform");
 
 filter_browser($browser, $platform);   // filter the browser
   
   
  
   
   
   
   
?>