|  | Posted by Rami Elomaa on 04/19/07 12:59 
"rajasekhar" <rajajan09@gmail.com> wrote in message news:1176986847.567106.158540@b58g2000hsg.googlegroups.com...
 > Hallo,
 >
 > I am developing a site, and here whats the problem is: how to
 > partition the code, i.e. if I  developed 1000 lines of code, in that I
 > want to show first 200 lines only if the user opens my website using
 > IE, and next 200 lines in Firefox, and remaining lines in another
 > browsers.
 >
 > Here am asking that how to compatible the total code depending upon
 > the browsers used by users.
 
 echo $_SERVER['HTTP_USER_AGENT'];
 
 if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false)){
 
 // code for firefox
 
 } else if ( .....
 
 Also you should know that some browsers can send a different useragent
 string than what the actually are. Opera for example can pretend to be IE.
 So it can't be trusted 100%, it's only about 95% accurate. (95% is based on
 a personal guess, not on an actual reserch..)
 
 > if you know any thing please mail me to rajajan09@gmail.com
 
 Sorry, but I'm replying to the group. This is the way usenet works.
 
 --
 Rami.Elomaa@gmail.com
 
 "Good tea. Nice house." -- Worf
  Navigation: [Reply to this message] |