Jump to content

how to deny acces to website with a speciel browser ect?...


rootKID
 Share

Recommended Posts

yoyo W3 again...i have a question, even when its a stupid one. does anyone knows how to deny acces to a website made with a speciel browser?... like if i where to only wish google chrome users to see my site (as a examble)... is that possible?... -thanks in advance...

Edited by rootKID
Link to comment
Share on other sites

true... and i dont wish to... just a question :P... the only thing i know of is about .htacces... but what my question was about was if there was a method made in .PHP?... (maybe me not being more detailed, still working on that part in me :P..)

Link to comment
Share on other sites

Look at the $_SERVER['HTTP_USER_AGENT'] and try to figure out which one Chrome uses. The change all the time and the user has control over what is sent or whether it is sent.

Link to comment
Share on other sites

yeah, i can't imagine anyone blocking an entire browser market from their website. It's really not that hard to support all browsers, even IE6/7.

Link to comment
Share on other sites

sorry for a little bit delay dudes, and yeah, i will see into it... but wont use it... more a question so i know's how to do in case of some of my clients wish to do so... example, i had a flower shop last week, and he wished that Opera not could get into he's website... and i did not knew how to do it...so im simply reading up upon it...

Link to comment
Share on other sites

Just a quick note $_SERVER['HTTP_USER_AGENT'] is going to give you a nasty little string like Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11 so you will need to employ some regex and tinker with all of the browsers to see exactly what each browser sends as the agent string. Personally, I think it is a terrible idea no matter what reason you provide.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...