Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To identify the user's browser server-side, you'll have to parse the <code>$_SERVER['HTTP_USER_AGENT']</code> variable...</p> <p><br> ... Or, probably better, use the <a href="http://php.net/manual/en/function.get-browser.php" rel="noreferrer"><code>get_browser</code></a> function -- just note you'll have to configure something in php.ini, or you'll get this kind of warning :</p> <pre><code>Warning: get_browser() [function.get-browser]: browscap ini directive not set </code></pre> <p>Like the PHP manual page says :</p> <blockquote> <p><strong>Note :</strong> In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system. browscap.ini is not bundled with PHP, but you may find an up-to-date » <a href="http://browsers.garykeith.com/downloads.asp" rel="noreferrer">php_browscap.ini</a> file here.</p> <p>While browscap.ini contains information on many browsers, it relies on user updates to keep the database current. The format of the file is fairly self-explanatory.</p> </blockquote> <p><br> After downloading that file and adding this line to php.ini :</p> <pre><code>browscap = /home/squale/developpement/tests/temp/php_browscap.ini </code></pre> <p>The following portion of code :</p> <pre><code>var_dump(get_browser(null, true)); </code></pre> <p>Gives me :</p> <pre><code>array 'browser_name_regex' =&gt; string '^mozilla/5\.0 (x11; .*linux.*; .*rv:1\.9.*) gecko/.*$' (length=53) 'browser_name_pattern' =&gt; string 'Mozilla/5.0 (X11; *Linux*; *rv:1.9*) Gecko/*' (length=44) 'parent' =&gt; string 'Mozilla 1.9' (length=11) 'platform' =&gt; string 'Linux' (length=5) 'browser' =&gt; string 'Mozilla' (length=7) 'version' =&gt; string '1.9' (length=3) 'majorver' =&gt; string '1' (length=1) 'minorver' =&gt; string '9' (length=1) 'alpha' =&gt; string '1' (length=1) 'frames' =&gt; string '1' (length=1) 'iframes' =&gt; string '1' (length=1) 'tables' =&gt; string '1' (length=1) 'cookies' =&gt; string '1' (length=1) 'javaapplets' =&gt; string '1' (length=1) 'javascript' =&gt; string '1' (length=1) 'cssversion' =&gt; string '2' (length=1) 'supportscss' =&gt; string '1' (length=1) 'beta' =&gt; string '' (length=0) 'win16' =&gt; string '' (length=0) 'win32' =&gt; string '' (length=0) 'win64' =&gt; string '' (length=0) 'backgroundsounds' =&gt; string '' (length=0) 'cdf' =&gt; string '' (length=0) 'vbscript' =&gt; string '' (length=0) 'activexcontrols' =&gt; string '' (length=0) 'isbanned' =&gt; string '' (length=0) 'ismobiledevice' =&gt; string '' (length=0) 'issyndicationreader' =&gt; string '' (length=0) 'crawler' =&gt; string '' (length=0) 'aol' =&gt; string '' (length=0) 'aolversion' =&gt; string '0' (length=1) </code></pre> <p>on firefox 3.5 ; and :</p> <pre><code>array 'browser_name_regex' =&gt; string '^.*$' (length=4) 'browser_name_pattern' =&gt; string '*' (length=1) 'browser' =&gt; string 'Default Browser' (length=15) 'version' =&gt; string '0' (length=1) 'majorver' =&gt; string '0' (length=1) 'minorver' =&gt; string '0' (length=1) 'platform' =&gt; string 'unknown' (length=7) 'alpha' =&gt; string '' (length=0) .... 'aol' =&gt; string '' (length=0) 'aolversion' =&gt; string '0' (length=1) </code></pre> <p>On a recent version (4.0.203.2) of google chrome for Linux -- well, considering it's some kind of nightly build, I suppose it's normal that it's not recognized...</p> <p>As a reference, here is it's user-agent string :</p> <pre><code>string 'Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.203.2 Safari/532.0' (length=109) </code></pre> <p><br> This show that get_<code>browser is</code> nice ; but maybe not perfect for some cutting-edge test browser -- still, should work fine with most "common" browsers, I suppose...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload