From c5d1730735d906f5848b27b255a7f7c11c51cdcd Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Mon, 30 Dec 2002 16:05:14 +0000 Subject: [PATCH] Made existence of browscap.ini a little more clear, noted when register_globals affected it which closes bug #6513, and fixed typo as this still returns an object. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@109400 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/misc/functions/get-browser.xml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/reference/misc/functions/get-browser.xml b/reference/misc/functions/get-browser.xml index dd2b188b1a..db08cc280d 100644 --- a/reference/misc/functions/get-browser.xml +++ b/reference/misc/functions/get-browser.xml @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ Description - arrayget_browser + objectget_browser stringuser_agent @@ -25,7 +25,7 @@ get_browser. - The information is returned in an array, which will contain + The information is returned in an object, which will contain various data elements representing, for instance, the browser's major and minor version numbers and ID string; &true;/false values for features such as frames, JavaScript, and cookies; and so @@ -88,9 +88,10 @@ Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)
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. An up-to-date - browscap.ini file can be located - here. By default, this + browscap.ini file on your system. + browscap.ini is not bundled with PHP but you + may find an up-to-date + browscap.ini file here. By default, the browscap directive is commented out.
@@ -102,6 +103,15 @@ Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)
reload, and check for the value.
+ + + On versions older than PHP 4.0.6, you will have to pass the + user agent in via the optional user_agent + parameter if the PHP directive + register_globals is off. In this case, + you will pass in $HTTP_SERVER_VARS['HTTP_USER_AGENT']. + +