.................................
To leave Commie, hyper to
http://commie.oy.com/commie_leaving.html
.................................

On Fri, 16 Mar 2001, Juuso Koponen wrote:

> > this is something you should do on serverside. what if javascript is
> > disabled? like many of us have? there is one good reason to use
> 
>       You're right about that, but I can't do any server-side coding (don't
> know how to), and our ASP coders (at work, that is) are too lazy
> bastards to do anything about such measily problems as font sizes. And
> I'm not even a f*cking coder (I'm the usability geek), but it's always
> bloody me who has to figure out these things. Goddamn those incompetent
> programmers.. (And there's the reason why I don't even want to learn to
> program server-side, then I'd be doing all the bloody work miself
> again..)

now here simple framework with PHP.

<?php

if(eregi("msie", $HTTP_USER_AGENT)) 
{
  print("hello ie user, your browser is $HTTP_USER_AGENT");
}
elseif(eregi("mozilla", $HTTP_USER_AGENT))
{
  print("hello netscape/mozilla user");
}
elseif(eregi("lynx", $HTTP_USER_AGENT))
{
  print("hello lynx user");
}
elseif(eregi("opera", $HTTP_USER_AGENT))
{
  print("hello opera user");
}
else {
  print("you have $HTTP_USER_AGENT");
}

-----

ok i don't have a clue what Opera has in it's $HTTP_USER_AGENT, nor i
don't have Mozilla's string quickly available (probably something
with mozilla, so goes down with netscape on that.. but). one could easily
add version detect on above too. if there was version detect, would be
easy to find if mozilla part actually means netscape 3, netscape 4, or
netscape 6 or mozilla.  and you could add OS detect on it too.. you could
first do OS detect, then build a function out of the above... and so
on.. or you could ask someone to do it in perl, even better, obfuscated
perl ;)

i don't guarantee above works. didn't test it. so there might be typos :)

sakke
-- 
A dream will always triumph over reality, once it is given the chance.
                -- Stanislaw Lem


Reply via email to