|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can I have something like IIS's browsecap
on Apache+PHP3+Linux? Thanks |
|
#2
|
|||
|
|||
|
Enlighten us non-IIS users - what does the "browsecap" function do??
|
|
#3
|
|||
|
|||
|
;-) actually, I am not IIS person either - see http://www.uroam.com for yourself.
Browsecap is a server-side module (ActiveX for MS IIS) that allows a server-side script to have info on different features of the browser used to view the site. The elegance of the solution is in the fact that it is driven by a data file containing description for each and every browser in existence. This file is maintained by folks at Cyscape. My idea was to find PHP3-based solution reusing Cyscape capabilities files or at least the one that could be driven by an externally maintained (hierarchichal) database. I think this could make a wonderful PHP3 project. I realised the need for it when newly released client-side JavaScript client sniffer (http://developer.netscape.com/docs/examples/javascript/browser_type.html) failed on me ;-( Thanks |
|
#4
|
|||
|
|||
|
For some reason it's not documented well at php.net, but there's a function called get_browser(). The Core PHP Programming book touches on this a bit. The function relies on browscap.ini, which is available from http://php.netvision.net.il/browscap/ . Here's the example from the book:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> Syntax: object get_browser(string user_agent) <? $browser = get_browser(); print("You are using " . $browser->browser . "<BR>n"); if($browser->javascript) { print("Your browser supports JavaScript.<BR>n"); } ?>[/quote] Hope that helps. - Scott ------------------ ----- Scott Stevenson Maxify.com |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Q: browsecap-like feature in PHP3? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|