hello every body ..
so today i have made this little modification to restrict certain browser from browsing your site .. lets say you have a compatibility issue with a certain browser and your not willing to solve it ... or you don't want ppl using i phone to open your site using safari .. and so on
all you have to do is download the file i have attached
and then upload it in the "inc" directory
and then open header.inc.php
now after the "<?" tag add
require_once('restricted.php');
and then search for $aErrors = array();
and then add after it (in a new line would be better)
// this part is to restrict browsers
$browser = new Browser();
if( ( $browser->getBrowser() == Browser::BROWSER_CHROME && $browser->getVersion() >= 2 ) ) {
$aErrors[] = "to use this web site you have to use IE or FIREFOX"; }
finally search for {$sErrors}
and delete the following
<br />
Please go to the <br />
<a href="http://www.boonex.com/trac/dolphin/wiki/GenDolTShooter">Dolphin Troubleshooter</a> <br />
and solve the problem.
and your done ( dont forget to save your work ;) )
in the example above i have restricted google chrome you can change BROWSER_CHROME with any thing you would like to from the following list.
BROWSER_UNKNOWN = unknown
VERSION_UNKNOWN = unknown
BROWSER_OPERA = Opera
BROWSER_OPERA_MINI = Opera Mini
BROWSER_WEBTV = WebTV
BROWSER_IE = Internet Explorer
BROWSER_POCKET_IE = Pocket Internet Explorer
BROWSER_KONQUEROR = Konqueror
BROWSER_ICAB = iCab
BROWSER_OMNIWEB = OmniWeb
BROWSER_FIREBIRD = Firebird
BROWSER_FIREFOX = Firefox
BROWSER_ICEWEASEL = Iceweasel
BROWSER_SHIRETOKO = Shiretoko
BROWSER_MOZILLA = Mozilla
BROWSER_AMAYA = Amaya
BROWSER_LYNX = Lynx
BROWSER_SAFARI = Safari
BROWSER_IPHONE = iPhone
BROWSER_IPOD = iPod
BROWSER_IPAD = iPad
BROWSER_CHROME = Chrome
BROWSER_ANDROID = Android
BROWSER_GOOGLEBOT = GoogleBot
BROWSER_SLURP = Yahoo! Slurp
BROWSER_W3CVALIDATOR = W3C Validator
BROWSER_BLACKBERRY = BlackBerry
BROWSER_ICECAT = IceCat
BROWSER_NOKIA_S60 = Nokia S60 OSS Browser
BROWSER_NOKIA = Nokia Browser
BROWSER_MSN = MSN Browser
BROWSER_MSNBOT = MSN Bot
BROWSER_NETSCAPE_NAVIGATOR = Netscape Navigator
BROWSER_GALEON = Galeon
BROWSER_NETPOSITIVE = NetPositive
BROWSER_PHOENIX = Phoenix
note that im not responsible for any damages coming from this modification and your at your own but i will try to help..