Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Browser Check
Google
Post new topic Reply to topic
Author Message
QWERTYtech
 
 


Joined: 03 May 2006
Posts: 47

PostPosted: Wed Jul 05, 2006 7:55 pm Reply with quoteBack to top

I was wondering if anyone has a JavasScript or PHP function that checks all the known browser types. I am currently havin problems viewing pictures in a pop-up window. I am using Mozilla and I don't have pop-up blocker turned on. I can view the pics just fine through IE. Can anyone help me with this please?

site http://redbeardcustoms.no-ip.info/WebSite/garage.html

Thanks,
QWERTYtech
View user's profileSend private messageAIM Address
dale
 
 


Joined: 11 Jun 2006
Posts: 51
Location: las vegas, nv

PostPosted: Sat Jul 15, 2006 3:38 am Reply with quoteBack to top

This might help you. It's an outside link.

http://www.webmasterworld.com/forum26/119.htm
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Sun Jul 16, 2006 12:50 am Reply with quoteBack to top

I search the http_user_agent for certain strings to determine browsers.

Example PHP Code:
Code:
$browser = $_SERVER['HTTP_USER_AGENT'];
/** General Notes:
*  $browser will contain one of the following values:
*      'iewin' : IE 4+ for Windows
*      'iemac' : IE 4 for Macintosh
*     'ie5mac' : IE 5 Macintosh
*      'nswin' : Netscape 4.x Windows
*     'nsunix' : Netscape 4.x Unix
*      'nsmac' : Netscape 4.x Mac
*        'ns6' : Netscape 6 / Mozilla
*/

if(preg_match("/firefox/i", $browser)) {
   //Do Nothing
} else {
   $CleanE107SitebaseAndPluginbase = SITEURLBASE.e_PLUGIN_ABS;
   $head = "Get Firefox";   
   if(preg_match("/iewin/i", $browser)||preg_match("/iemac/i", $browser)||preg_match("/ie 6/i", $browser)||preg_match("/ie 7/i", $browser) ) {
      $text = " <center><a href='http://www.mozilla.com/firefox/' target='_blank'>
      <img src= '$CleanE107SitebaseAndPluginbase/firefox_discoverer/images/clippy.gif' /></a></center> ";
      $text .="<b>Client Info:</b> ".$browser;         
   } else {
      $text = " <center><a href='http://www.mozilla.com/firefox/' target='_blank'>
      <img src= '$CleanE107SitebaseAndPluginbase/firefox_discoverer/images/nofirefox.gif' /></a></center> ";
      $text .="<b>Client Info:</b> ".$browser;
   } 
   $ns -> tablerender($head,$text);
}
View user's profileSend private messageYahoo MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT