Code: Select all
<?
// Assign VAR $agent to display browser specifications
$agent=getenv("HTTP_USER_AGENT");
// Version check
if (preg_match("/MSIE 5/i", "$agent"))
{
header("Location: /installbrowser.php");
exit;
}
else
if (preg_match("/MSIE 6/i", "$agent"))
{
$result="Your Ms Internet Explorer is up to date...";
}
else
{
$result="You are using $agent please call IT Support for more information";
}
?>
<html>
<head>
<title>Browser match results</title>
</head>
<body>
<p><img src="DWPlogo.jpg" width="151" height="87"></p>
<?
// This will display the results to page
echo "<p>$result</p>";
//header( "Location: /browserLink.htm");
//exit;
?>
</body>
</html>Code: Select all
<?php
$downloadfile="ie6setup.exe";
$path = "c:/inetpub/wwwroot";
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".(string)(filesize($path.'/'.$downloadfile)));
header("Pragma: no-cache");
header("Expires: 0");
readfile($path.'/'.$downloadfile);
?>