Differences

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

Link to this comparison view

dev:browsercaps [2008/01/24 09:16]
ravithb
dev:browsercaps [2009/07/06 20:36]
Line 1: Line 1:
-====== Sahana Browser Capabilities ====== 
- 
-=== Introduction === 
- 
-Sahana uses PHP Browser Capabilities Library found at [[http://garetjax.info/projects/browscap/#download]]. 
- 
-=== How it works === 
- 
-This library will automatically download the browscaps.ini file from the internet  (If file is not found under /www/tmp/bcaps_cache/) and cache it to the same location. The class will then work on the cached file. 
- 
-=== Known Issues. === 
- 
-There is a short delay the first time the file is downloaded (if it is not available locally or an updated version is available online). 
- 
-=== Usage === 
- 
-In order to use the browser capabilities library it needs to be included. 
- 
-<code php> 
-    global $global; 
-    include_once ($global['approot']."inc/browser_caps.inc"); 
-</code> 
- 
-This will create a browser capabilities object and store it under the key 'bcaps' in $global. 
- 
-<code php> 
-    $global['bcaps'] // The browser capabilities object will be stored here. 
-</code> 
- 
-The following shows the fields of the browser capabilities object and it was extracted from [[http://garetjax.info/projects/browscap/#example]] 
-<code> 
-stdClass Object 
-( 
-    [browser_name] => Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11 
-    [browser_name_regex] => ^mozilla/5\.0 \(x11; .*; .*linux.*; .*; rv\:1\.8.*\) gecko/.* firefox/2\.0.*$ 
-    [browser_name_pattern] => Mozilla/5.0 (X11; *; *Linux*; *; rv:1.8*) Gecko/* Firefox/2.0* 
-    [Parent] => Firefox 2.0 
-    [Platform] => Linux 
-    [Browser] => Firefox 
-    [Version] => 2.0 
-    [MajorVer] => 2 
-    [Frames] => 1 
-    [IFrames] => 1 
-    [Tables] => 1 
-    [Cookies] => 1 
-    [JavaApplets] => 1 
-    [JavaScript] => 1 
-    [CSS] => 2 
-    [CssVersion] => 2 
-    [supportsCSS] => 1 
-    [MinorVer] => 0 
-    [Alpha] =>  
-    [Beta] =>  
-    [Win16] =>  
-    [Win32] =>  
-    [Win64] =>  
-    [BackgroundSounds] =>  
-    [AuthenticodeUpdate] =>  
-    [CDF] =>  
-    [VBScript] =>  
-    [ActiveXControls] =>  
-    [Stripper] =>  
-    [isBanned] =>  
-    [WAP] =>  
-    [isMobileDevice] =>  
-    [isSyndicationReader] =>  
-    [Crawler] =>  
-    [AOL] =>  
-    [aolVersion] => 0 
-    [netCLR] =>  
-    [ClrVersion] => 0 
-) 
-</code> 
- 
  

Navigation
QR Code
QR Code dev:browsercaps (generated for current page)