WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Browser Detection, Redirection Type, MSIE, MOZILLA, Netscape Navigator, NS, $HTTP_USER_AGENT, HTTP_USER_AGENT
Categories : PHP, HTTP, Browsers, HTML and PHP Update Picture
Josh Tuttle
Date : Feb 11th 2000
Grade : 3 of 5 (graded 9 times)
Viewed : 16425
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Josh Tuttle
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?php

// Obviously this is the simplest script in the world but it's still nice.
// All it does is tell the user what Browser they are using, which isn't help full
// but you can put HTML into $page and display certain HTML for NON-IE and different
// ones for MSIE, which is very nice!

// daedalus@flash.net
// P.S. Delete all this crap after the '//'


$Browser_Type = strtok($HTTP_USER_AGENT, "/");

if(ereg( "MSIE", $HTTP_USER_AGENT))

{
$page = "YOU ARE USING IE"; // This is all the stuff that will work in MSIE like xml, etc.
}
else
{
$page = "YOU ARE NOT USING IE"; // This is for stuff that you doesn't work in NS or AOL
so you put a subsitute code
}

?>

<html>
<head>
<title>Browser</title>
</head>
<body>
<? echo $page; ?>
</body>
</html>



How to let a user download a picture by clicking on it instead of needing to right click and Save-As.
Categories : HTTP, PHP, HTML and PHP, Filesystem
PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
Produces browser-safe strings while preserving HTML tags.
Categories : Strings, HTTP, PHP, HTML and PHP
PHP4 HTTP Compression Speeds up the Web
Categories : PHP, Zlib, HTML and PHP, HTTP, Network
How to force the user to download a file instead of opening it up in an controlled environment within the browser (i.e. MS Word/Adobe Acrobat)
Categories : Browsers, PHP, HTTP
Upload Script, Upload File Script, Input Type="File"
Categories : PHP, HTML and PHP, HTTP
This script shows you the 7th latest php items from the mailing list archive on zend.com
Categories : HTML, HTML and PHP, HTTP, PHP
Pseudo Non Parsed Header. Output to the the browser as the script runs.
Categories : PHP, HTTP, HTML and PHP
Multiple Select box, Select multiple Items from Menu.List box
Categories : PHP, HTML and PHP, Beginner Guides
This script contains 2 functions: 1 to create html select object based on your own customer date format entry- "M d Y h:i.... etc". The second function processes the select object on submit back to unix time.
Categories : PHP, Calendar, Date Time, HTML and PHP
Forcing a proxy to not cache a document
Categories : HTTP, PHP
Check whether your referer is coming from your website or from someone else's. Very useful when you want to represent the data without your domain name for internel link-mapping in some COUNTER.
Categories : PHP, HTTP
Directory TreeView - File Manager & Explorer - FTP - Utility - PHP/HTML -
Categories : PHP, Directories, FTP, Filesystem, HTML and PHP
Pull deliniated text strings into a "SELECT" statement in a form.
Categories : HTML and PHP, PHP, Strings
Website colour changer
Categories : PHP, HTML and PHP, Date Time
  wrote :226
OPPS on the // This is for stuff that you doesn`t work 
in NS or AOL  

I meant

// This is for stuff that you DOES work in NS or AOL, 
crap that won`t work in MSIE, like some CSS`s, XML, 
ILAYERs, and MSIE only JavaScript and DHTML

So don`t put any DHTML and crap in the else $page

Boy i like using crap, eh?