can i get browser info?
Moderator: General Moderators
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
can i get browser info?
hi there...
is there any thing is php that can tell browser infomation? like if i want to know that browser has java script support or browser is java script enabled?
Regards!
is there any thing is php that can tell browser infomation? like if i want to know that browser has java script support or browser is java script enabled?
Regards!
get_browser : http://in.php.net/manual/en/function.get-browser.php
I tried this on my host :
Warning: get_browser(): browscap ini directive not set. in /xxx/xxx/getbrowser.php on line 2
Anyway to set it for ourself like the way we do in .htaccess ?
I tried this on my host :
Warning: get_browser(): browscap ini directive not set. in /xxx/xxx/getbrowser.php on line 2
Anyway to set it for ourself like the way we do in .htaccess ?
- smpdawg
- Forum Contributor
- Posts: 292
- Joined: Thu Jan 27, 2005 3:10 pm
- Location: Houston, TX
- Contact:
You need to get browscap.ini from a site like this http://www.garykeith.com/browsers/downloads.asp and set browscap in your php.ini before you can use it.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
PHP will not be able to detect is JS is enabled; only if the browser has support for it. As d11wtq mentioned, <noscript> is intended for that. You can roll your own version by understanding how the get_browser() function works, which is simple pattern matching. You'll need to use parse_ini_file() to load the ini.. then flip through it searching for the browser.
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
i just want u to tell me how can i know about browser behaviour, that either it supports java script or not and if it does is that enabled or not? if you can tell me pzl. telfeyd wrote:PHP will not be able to detect is JS is enabled; only if the browser has support for it. As d11wtq mentioned, <noscript> is intended for that. You can roll your own version by understanding how the get_browser() function works, which is simple pattern matching. You'll need to use parse_ini_file() to load the ini.. then flip through it searching for the browser.