logo
What's New
What's New
  Popular
Popular
  Top Rated
Top Rated
  Search
Search


Search :  

How to Add Link |   Modify Link   |   Login |     Register  |  Getting Rated |  Link to Us |  Feedback Us


Sponsors
FlashAdvisor.com
Web Directory
phpld Hacks
Your Site Link




Categories
    3DS MAX
    ASP
    C And C++
    ColdFusion
    Database
    Dreamweaver
    Flash
    HTML
    Java
    JavaScript
    Linux
    Maya
    MS Excel
    MS PowerPoint
    MS Word
    Paint Shop Pro
    Perl and CGI
    Photoshop
    PHP
    Premiere
    Python
    Visual Basic
    Web Hosting
    XML
 

 

PHP-browserdetecting script
  

Home  » PHP » Content Management  

PHP-browserdetecting script This tutorial explains how to identify IE4+ or NS4+ on a windows 32 bit platform (all else is "OtherBrowser") and include different html Web pages for different browser types using PHP. A browserdetecting script for PHP that decides wich files that should be included, As I started with my php-site I needed something that could identify what browser the visitor was using. Why? Because I'm using three different types of navigation styles on my site, one that's IE4+ only, one for NS4+ and one for the rest. When you are using javascript, there's a lot of different browserdetectors to use, but I had difficulties finding one for php. Finally I found one that got me started, it didn't work as I wanted so I modified it a lot. Here I'll present it and try to walk you through it. What did I need to start modifying this? Well, I started everything by making a simple javascript that I could run in different browsers, It writes out exactly what the different navigator objects contains, this way it's a lot easier to know what to test for. Here is what your current browser contains: The appname of the current browser is: Microsoft Internet Explorer The appcodename of the current browser is: Mozilla The appversion of the current browser is: 4.0 (compatible; MSIE 6.0; Windows NT 5.1) The useragent of the current browser is: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) The appminorversion of the current browser is: ;SP2;

Hits: 108
Rate:   0.0(out of 5)  
Vote : 0   
Submit Date  : 2006-03-18
Submit By  : dmsproject
View Tutorial PHP-browserdetecting script
 Add Review
 Report Error
Rating Graph

0.0%
0.0%
0.0%
0.0%
0.0%
 1  2  3  4  5 
Rate This :
More Tutorials by this user

  
Home | Sitemap | Feedback | Advertise with us
Best viewed in 800x600 resolution with Internet Explorer.
Site Developed and Hosted by EthicSolutions

Flash Tutorials    TemplateAdvisor.com    WebMastersHome.com

    Reseller Hosting    Reseller Hosting Linux