#1
  1. No Profile Picture
    sokolsky
    Guest
    Devshed Newbie (0 - 499 posts)
    Can I have something like IIS's browsecap
    on Apache+PHP3+Linux?

    Thanks
  2. #2
  3. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    Enlighten us non-IIS users - what does the "browsecap" function do??
  4. #3
  5. No Profile Picture
    sokolsky
    Guest
    Devshed Newbie (0 - 499 posts)
    ;-) 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
  6. #4
  7. No Profile Picture
    scottcs
    Guest
    Devshed Newbie (0 - 499 posts)
    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

Similar Threads

  1. Apache2 w/ php4 as DSO.. but I need to revert to php3
    By JunkCookie in forum PHP Development
    Replies: 0
    Last Post: August 11th, 2003, 02:05 PM
  2. "Search" feature on site
    By MattG in forum HTML Programming
    Replies: 3
    Last Post: May 2nd, 2003, 10:55 AM
  3. cannot read php3 scripts
    By MKashlev in forum PHP Development
    Replies: 1
    Last Post: September 2nd, 2001, 10:48 PM
  4. PHP3 -> PHP4 - how to reconfigure applications?
    By adam2000 in forum PHP Development
    Replies: 1
    Last Post: December 14th, 2000, 01:00 AM
  5. PHP3 and PHP4 together
    By an_easy_marc in forum PHP Development
    Replies: 1
    Last Post: October 20th, 2000, 04:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo