Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Internet Explorer Sucks, Yeah, I said it.
KansukeKojima
post Jan 13 2008, 08:34 PM
Post #1


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



I'll give you guys a special sneak preview of this tutorial... a good ten minutes before it comes out on my website... enjoy.

Internet Explorer Sucks


Description
Its time to send those pesky Internet Explorer users a message. Learn how with my brand new "IE Sucks" PHP Code. (Only $29.99, but wait there's more!)

Try It Out
Alright, in order to give those IE users what they deserve we will be using the good ol' HTTP_USER_AGENT command. This command grabs the users browser name, etc. Its also useful for all kinds of other things such as stalking somebody.... *cough*


CODE
<?php
$browser = $_SERVER['HTTP_USER_AGENT'];
?>


Alright, good job, young php-learner. As you can probably guess, this does pretty much nothing.

So far all we have done is create the $browser variable and given it a value. Next we'll create the message for those IE users.

CODE
<?php
$browser = $_SERVER['HTTP_USER_AGENT'];
if(strstr($browser, "MSIE")) {
$message = "You *_edit_*, you're using Internet Explorer. Get something else now!";
} else {
$message = "You are not using Internet Explorer. Good.";
}
echo $message;
?>

Ok, so basically, if the value of the $browser variable (which contains the HTTP_USER_AGENT command) has the phrase MSIE (Microsoft Internet Explorer) somewhere in it, the page calls the viewer a douchebag... And if they are not using MSIE, then it pats them on the back.

Of course you can always modify this code to say "Good job" to MSIE users, etc. Or insult users of different browsers... in general, this is a very fun code to play around with and I hope you enjoy it.
Notice from jlhaslip:
Edit word as per above.
Go to the top of the page
 
+Quote Post
budsu
post Jan 14 2008, 06:47 AM
Post #2


Newbie [Level 3]
***

Group: Members
Posts: 44
Joined: 13-January 08
Member No.: 56,175



i dont know the code but i know that IE drags to himself all kinds of toolbars i had once 4 or 5 at once .
i switched to firefox witch just god popular (right before windows vista and new *IE) i liked it becouse of tabs .

but i cant get used to IE again -> wheneever i reinstall widows the first thing i download is Firefox
Go to the top of the page
 
+Quote Post
hitmanblood
post Jan 14 2008, 07:08 AM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 792
Joined: 13-April 07
From: mreža
Member No.: 41,558



First of all that code is not intended in such way that is I think that you are misusing the code provided biggrin.gif why? because this code is in face intended to help developers because different browsers have different ways of showing very different things and if you are clever enough to use some programs like dreamwaver then you may find that it has compatibility check this is one of its integrated options and this will help you because then you can adjust your code to return correct encoding for the computer that is using your site.

Also remember that the thing that is very important is that internet explorer is still the most used browser today and something else internet explorers things that infacted me and most of the users the most are in fact its integration with the micrsoft operating system windows and as internet explorer was integrated into the kernel in windows xp this produced many problem and security issues however now things should have changed since it is no longer integrated in the kernel of operating system making it more reliable and a lot more secure.

And one more final thing I use mozilla firefox because it is a lot betteer and more usuful then internet explorer or any other browser nto because other browsers "suck".

Regards
Go to the top of the page
 
+Quote Post
b1gv1c
post Jan 14 2008, 06:26 PM
Post #4


Newbie [Level 2]
**

Group: Members
Posts: 25
Joined: 14-January 08
From: San Diego, CA
Member No.: 56,255



I use ie at work and it sucks. I love firefox. My ie crashes far too often. Especially now that I have ie 7 with vista.
Go to the top of the page
 
+Quote Post
KansukeKojima
post Jan 14 2008, 07:16 PM
Post #5


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Although I agree IE is not good, and that the tutorial title is misleading... please try to keep comments relative to the tutorial... not your comments on IE... please.
Go to the top of the page
 
+Quote Post
Forbez
post Jan 15 2008, 04:34 PM
Post #6


Privileged Member
*********

Group: [HOSTED]
Posts: 628
Joined: 13-December 06
Member No.: 35,271



Internet Explorer sucking, is more a of fact then a tutorial tongue.gif.

But yes, very good. Could you expand on this? Add ways to change the entire content of the website?
Go to the top of the page
 
+Quote Post
KansukeKojima
post Jan 15 2008, 10:10 PM
Post #7


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Well I suppose that instead of hate-messages, have different layout codes etc. to suit different browsers.... I'll write that up later... unless someone else does.
Go to the top of the page
 
+Quote Post
xavierkym
post Jan 19 2008, 11:06 PM
Post #8


Newbie [Level 1]
*

Group: Members
Posts: 19
Joined: 19-January 08
Member No.: 56,513



You can even use Javascript just like this one:
CODE

<script type="text/javascript">

var browser = navigator.appName
var type = "Microsoft Internet Explorer"
if ( browser == type)
{
alert('You are using Internet Explorer!!');
alert('Just click OK to download Firefox LOL!!');
document.location = "http://www.mozilla.com";
}

</script>


Hehe.. Just sharing.. rolleyes.gif
Go to the top of the page
 
+Quote Post
anachro
post Jan 20 2008, 12:59 AM
Post #9


Member [Level 1]
****

Group: Members
Posts: 68
Joined: 7-January 08
Member No.: 55,865



whats Firefox's abbreviation? Like how IE's is MSIE