Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php browser detection

Featured Replies

Good Morning all.

I am currently in development of my employers new website,

I have used several jquery plugins one of which being a border radius plugin.

 

When i have this plugin installed several things on the website do not work with internet explorer 7 and 8

 

so what iw ould like to do,

is with php detect the browser,

if its internet explorer 7 or 8, include header1.php

if its anything else, include header2.php?

 

Can anyone advise

 

Thanks in advance.

 

 

Craig

  • Author

na because ive got to exclude files and include other files and js within the header document

Something like this.

 

I got the user agent string from here: http://blogs.msdn.com/b/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx

<?php
if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)') :
// it's IE8 on Win7
else :
// it's something else
endif;

  • Author

if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.1; Trident/4.0)')
include 'Includes/Header.php';
else {
include 'Includes/IE_Header.php';
};

 

ok put this in and edited my headers. not working, any suggestions?

 

Thanks

 

Craig

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.