User Tools

Site Tools


wiki:software:code:php:browserid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:software:code:php:browserid [2022/09/21 16:23]
127.0.0.1 external edit
wiki:software:code:php:browserid [2022/09/26 17:21] (current)
claire ↷ Page moved from wiki:software:php:browserid to wiki:software:code:php:browserid
Line 3: Line 3:
 {{template>​util:​oldblog|date=August 22, 2008}} {{template>​util:​oldblog|date=August 22, 2008}}
  
-Not too long ago, I wrote a [[wiki:​software:​cfm:​browserid|short tutorial on using ColdFusion to identify the user’s browser and add extra browser-specific CSS files]]. Today, I found myself in need of similar functionality for PHP. The code isn’t quite the same – PHP doesn’t have a direct clone of CF’s ''​contains''​ decision operator; you have to use the ''​strstr''​ string function instead. The general idea, however, is the same.+Not too long ago, I wrote a [[wiki:​software:code:​cfm:​browserid|short tutorial on using ColdFusion to identify the user’s browser and add extra browser-specific CSS files]]. Today, I found myself in need of similar functionality for PHP. The code isn’t quite the same – PHP doesn’t have a direct clone of CF’s ''​contains''​ decision operator; you have to use the ''​strstr''​ string function instead. The general idea, however, is the same.
  
 The following script will identify between Firefox, IE6, and IE7. Like my last post, I’ve added an extra piece that will include an ''​ie.css''​ file before including an IE version-specific stylesheet. The following script will identify between Firefox, IE6, and IE7. Like my last post, I’ve added an extra piece that will include an ''​ie.css''​ file before including an IE version-specific stylesheet.