Navigation :

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




Site Sponsors :

Bookmark :

Links :

domain names
software directory
dropshippers

Downloads :

Misc :

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Browser Detection

This example shows some simple browser detection

<?php
$msie = eregi("MSIE" , $HTTP_USER_AGENT);
//look for MSIE in the HTTP_USER_AGENT
if ($msie == true)
{
echo ("You are using Internet explorer");
//header("location: internetexplorerpage.htm");
exit;
}
//now we will look for mozilla and of course if its not internet explorer
//we will assume its netscape navigator
$ns = eregi("mozilla" , $HTTP_USER_AGENT);
if ($ns == true)
{
echo ("You are using Netscape");
//header("location: netscapepage.htm");
exit;
}
//this is for all other browsers
else
{
echo ("You are not using Netscape or Internet explorer");
//header("location: otherpage.htm");
exit;
}
?>