Page 2 of 2

Posted: Mon Nov 07, 2005 4:11 am
by sheepz
Hrm... I'm looking at the code, i'm sure i'm missing something here it is exactly:

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>
Here is the installbrowser.php exactly:

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);
?>
Please let me know if you see something wrong with the header any suggestions, greatly appreciate it. I also re-downloaded the ie6setup.exe again just incase... still no luck.

Posted: Mon Nov 07, 2005 11:01 am
by sheepz
thanks for all your help every one. i downloaded a full version of ie6setup.exe instead of a small installer that microsoft had and it works. i'm able to install it with no problems. u were correct it was a corrupt exe file. Weird I tried a different exe and still did the same thing, odd but i'm glad it works, thanks so much for the help everyone! :D