Hi, Can anyone help me out? Need to know how to block all my website visitors who uses Opera as their web browser. Is there anyway to do this? Thank you. I will give +rep if anybody can really help me out.
Okay... here you go with the solution.... just visit the following link to download a zip file and you will get some detailed information on how to block browsers.... Download Link This is the detailed information... Hope it helps...
Downloaded the file.. but i am kinda confused how to use it to make it work. I almost know nothing about programming :-(
<?php $browser = get_browser(); if($browser->browser == "Opera") { print "you are blocked"; } else { print "you are welcome"; } ?>
you need to put it at top of your code I would use something like this: <?php $browser = get_browser(); if($browser->browser == "Opera") { die("no access for opera"); } ?> PHP:
or use include function, it will save your time for future. First create some file like, browser_check.php and put the code: <?php $browser = get_browser(); if($browser->browser == "Opera") { die("no access for opera"); } ?> PHP: and then include this code on top of all the pages of your site. make sure you provide the correct path for browser_check.php file. <?php include ("browser_check.php"); ?> PHP: