dorich Posted May 7, 2011 Posted May 7, 2011 background: I want to collect information on browser and OS from page viewers. It seems the way to do this is to use the "get_browser" function in php. However, to get the full array of data it appears that the php.ini file has to edited to point to a browscap.ini file. I've successfully done this on my development setup using a local MAMP installation. My production version will be on a Wordpress site hosted on TC. My Question If I use the "get_browser" function in a php script for the production version will the array attribute work because the php.ini file points to the browscap file? Alternatively can the php.ini file be edited? As you can probably tell from my questions I'm a neophyte on this subject and would appreciate some guidance. Thanks. Quote
TCH-Vimal Posted May 8, 2011 Posted May 8, 2011 You can create custom php.ini in your account and add this capability. To configure a site wide php.ini, create it in the root directory(/home/user/) and add the following line to .htaccess: suPHP_ConfigPath /home/user Once you have placed the php.ini as above,you can now configure browscap setting in php.ini and you can point it to the browscap.ini file on your account. Note : be sure to change "user" with correct cPanel user name. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.