Jump to content

Search the Community

Showing results for tags 'get_browser'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I have a php page that checks a user's browser, and if they are using any version of IE earlier than 9.0, it tells them they must use a different browser to access the page they are trying to get to. If their browser is compatible, it just passes them right along to the destination site. The code works perfectly in my WAMP testing environment, but when I put it on our LAMP server, it doesn't pull the browser info. Consequently, it passes the user on to the destination site, even if their browser is not compatible. I have configured my php.ini file to point to the correct path for my php_browscap file, and when I look at the php test page, it shows the correct location in the browscap value setting. Any ideas as to why this would not be working on the LAMP server? Or any ideas on a better way to accomplish what I am trying to do here? I am always open to better ideas. Here is the code: ------------------------------------------------------------------ <?php $browser = get_browser(NULL, TRUE); if($browser["browser"] == 'IE' AND $browser["version"] < 9) { echo "Your current internet browser is Internet Explorer Version " . $browser["version"] . ". "; echo "In order to use this website, you must either use Google Chrome, Mozilla Firefox, or Internet Explorer 9.0 or higher."; } else { header("Location: http://myURL"); } ?> <html> <p><a href = "http://www.microsoft.com/ie">Click here to install a current version of Internet Explorer</h></p> <p><a href = "http://www.mozilla.com/firefox">Click here to install Mozilla Firefox</h></p> <p><a href = "http://www.google.com/chrome">Click here to install Google Chrome</h></p> </html> -------------------------------------------------------------------- Thanks in advance for any insights!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.