Disable Internet Explorer in PHP
10 posts
Page 1 of 1
I am going to share how to disable your website on internet explorer web browsers. What your going to do is get the webbrowser the user is using.
Austin Livengood
Code: Select all
This will get the name of the webbrowser + everything else. Next, adding the if statement plus the "strpos."
$_SERVER['HTTP_USER_AGENT']
Code: Select all
Finally the full code:<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
}
?>
Code: Select all
Thanks,<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
echo "This site does not support Microsoft Internet Explorer";
} else {
echo "Your not using Microsoft Internet Explorer";
}
?>
Austin Livengood
so does this mean you can't access a webite with internet explorer?
sound great because mine website don't support internet explorer
so im happy with this code
thanks
sound great because mine website don't support internet explorer
so im happy with this code
thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
is there a way so it can be showed
that only IE9 been support?
can you helpme please blusho;
that only IE9 been support?
can you helpme please blusho;
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
The code is wrong, you should use die(" "); instead of echo " ";
Code: Select all
But if you want to accept IE only, they you should do this:
<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
die("This site does not support Microsoft Internet Explorer");
} else {
echo "Your not using Microsoft Internet Explorer";
}
?>
Code: Select all
Or if you just want to disable IE 6/7/8/9, place the number after MSIE<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
echo "This site does not support Microsoft Internet Explorer";
} else {
die("Your not using Microsoft Internet Explorer");
}
?>
Code: Select all
For more user-agent info, visit this<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) {
die("This site does not support Microsoft Internet Explorer 6");
} else {
echo "Your not using Microsoft Internet Explorer";
}
?>
Last edited by Codex on Mon Nov 07, 2011 9:38 pm, edited 1 time in total.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
i love this code.
do to that IE does not support "Radius" or "Shadow" effects for CSS.
Microsoft should stop creating new stuff and work on making the old stuff work. Better!
do to that IE does not support "Radius" or "Shadow" effects for CSS.
Microsoft should stop creating new stuff and work on making the old stuff work. Better!
The problem you will face by blocking users of a certain browser type like IE from viewing your site is that if those people are dedicated IE users they wont go through the hassle of having to download and install another browser just to be able to view your site meaning you will lose them as potential users, members, customers and IE is still used by 40-50% of people and IE6 still has is worshippers although I have no idea why :? lol.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
well the problem is with IE it don't accept PHP code cood :(
i have tested it 100 times with danny and still not working 100%
we don't know why but it was we even downloaded version IE9
and still the same problem.
thats the sad part :(
i have tested it 100 times with danny and still not working 100%
we don't know why but it was we even downloaded version IE9
and still the same problem.
thats the sad part :(
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Thats true, we've worked on it whole day to get it right, I made a new website for dummy in html 5 and without php it shows perfectly but with it is crap cryer; cryer;
idk what you guys are doing.
i have worked with PHP for years only using IE until Chrome came out.
and the only problems i ever had with PHP and IE was coding errors.
Developer error. In other words. I was doing something wrong.
Just just do like IE cause it can not parse CSS like the other browsers can.
Chrome Example:
IE Example:
If this is the case. I dont want anyone using IE to visit my site.
IE makes things look to ugly. Some issues I can work with.
It isn't a question of who can or who can not access the site.
To me it is a question of a Standard. If IE can not keep up with the rest of the world. Then the browser should be removed from publication.
i have worked with PHP for years only using IE until Chrome came out.
and the only problems i ever had with PHP and IE was coding errors.
Developer error. In other words. I was doing something wrong.
Just just do like IE cause it can not parse CSS like the other browsers can.
Chrome Example:
IE Example:
If this is the case. I dont want anyone using IE to visit my site.
IE makes things look to ugly. Some issues I can work with.
Internet Explorer and the border-radius PropertiesReference Link from msdn.microsoft.com
While the W3C has specified the border-radius properties in its latest CSS3 working draft, Microsoft has not implemented the border-radius properties in Internet Explorer 8.
Microsoft is committed to providing a browser that accurately supports Web standards. In Internet Explorer 8, we shipped several features from HTML5 and CSS3. Our primary goal was implementing CSS 2.1 (a specification that has reached final candidate stage) completely and correctly before moving on to specifications that are still in development and may change.
It isn't a question of who can or who can not access the site.
To me it is a question of a Standard. If IE can not keep up with the rest of the world. Then the browser should be removed from publication.
I like that this code has become a discussion. Glad you all like this code xD. I will share some more. php<3
10 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023