I have created a small piece of code that will look at the querystring for a variable, "id" and depending on the number it is, it will output a file.
While the gif and jpeg parts work, the shockwave part doesn't work. it just outputs a bunch of binary code.
Any assistance would be extremely appreciated.
<?
If ($id == 1) {
$fdir = "C:\track.gif";
$type = "image/gif";
} ElseIf ($id == 2) {
$fdir = "C:\SPC.jpg";
$type = "image/jpeg";
} Elseif ($id == 3) {
$fdir = "C:\sites\register.jmlcards.com\flash.swf";
$type = "application/x-shockwave-flash";
}
If (($fdir <> "") && ($type <> "")) {
Header("Content-type: $type");
$fp = fopen($fdir,"rb");
// display the output
fpassthru($fp);
fclose($fp);
}
?>