tags:

views:

95

answers:

3

it's not working.i mean i have many scripts to get ip and os but anyway get_browser is internal function and should work but its not.when i try to get a print_r on the function i get.

Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * [browser] => Default Browser [version] => 0 [majorver] => 0 [minorver] => 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => [backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => [javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] => [issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] => [aol] => [aolversion] => 0 ) 

I'm using win7 and firefox. And i have the latest browcap and set in php.ini.without that php returns error while idont get one.

+2  A: 

from php.net:

Note: 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 » php_browscap.ini file here. 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.

sounds like your browscap.ini isn't up to date.

oezi
+3  A: 

Make sure you have an up-to-date browscap file. Read the notes in the documentation of get_browser.

If you're not a server administrator, check out phpbrowcap which implements the same functionality but makes it possible for you to use another broswcap file than the server-wide one.

Emil Vikström
A: 

how to resolve this problem?

Bebe