|
| |||||||||
| Tags: browser, code, detect browser, php, php script, website |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How To Detect Browser Type With Php
I am looking for code in php to detect browser. The main purpose of this code is to find the browser type used by the visitors when they visit website. Is that possible in php? |
|
#2
| ||||
| ||||
| Re: How To Detect Browser Type With Php
Detecting the user’s browser type and version is helpful in web applications which give the idea to developer for new concepts. Some browsers allow the user to alter the way the browser identifies itself, or to not identify itself at all. With the browser type and version you can notify users about challenges they may experience and suggest they upgrade before using such application.Some firewalls block the sending of the browser identification, so no browser detection scheme is entirely successful. |
|
#3
| |||
| |||
| Re: How To Detect Browser Type With Php
you could also use something like this: Code: <pre><?php
echo ( browser_detection( 'number' ) .'<br>'.
bro_det( 'bro' ) .'<br>'.
bro_det( 'os' ) .'<br>'.
bro_det( 'os_num' ) );
?>
outputs (browser version, browser, os, os number):
y.4
moz
nt
4.y ( ( browser_detection( 'bro' ) == 'ie' )
&&
( browser_detection( 'num' ) >= 4 ) )
{
echo 'it is Mozilla firefox ' .
browser_detection( 'num' );
}
?>
</pre> |
|
#4
| |||
| |||
| Re: How To Detect Browser Type With Php Code: <?php
$br = strtolower($_SERVER['HTTP_USER_AGENT']);
if(ereg("msie", $br)) {
header("location: origpage.php");
} else {
header("location: alterpage.php");
}
?> |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How To Detect Browser Type With Php" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Content Type | Mime Type for Office 2010 file format and extension | ramsun | Tips & Tweaks | 1 | 16-08-2010 06:25 PM |
| Content Type | Mime Type for Office 2007 file format and extension | D_chapple | Tips & Tweaks | 1 | 16-08-2010 05:44 PM |
| Change a 64-bit browser to a 32-bit browser, or adding a 32-bit browser alongside the 64-bit browser | Chen | Technology & Internet | 5 | 31-07-2010 01:25 PM |
| Detect browser if Ie (internet explorer) then run script? | X-riskS | Software Development | 4 | 10-07-2009 10:57 PM |
| PlanPlus for Outlook v4.1_3237 - HR[80070057] - Variant type 8 incompatible with match MAPI type 64 | mobi | MS Office Support | 2 | 01-09-2007 03:43 AM |