<HTML>
<HEAD>
<TITLE> Hello World in PHP </TITLE>
</HEAD>
<BODY>
<?
print("Hello World<br>");
print("You are using $_SERVER[HTTP_USER_AGENT]<br>");
print("Your Internet address is $REMOTE_ADDR<br>");
// check to see if the $_SERVER[HTTP_USER_AGENT] variable contains MSIE
// the string or Internet Explorer
// this uses the ereg function for regular expressions
if (ereg("MSIE",$_SERVER[HTTP_USER_AGENT])) {
print("You may want to check microsoft.com often for patches");
} else {
print("You are using a browser other than IE");
}
?>
</BODY>
</HTML>