Hello,
I'm storing my content on a directory not accessible by web. In my pages I have the image tags call a page named viewcontent.php?file=$file to display the image. Works no problem.
I thought I could do the same for SWF files, but whenever I try the page just loads forever. Here is the code of my viwcontent.php page:
<?PHP
$ext = split('.',$_GET[file]);
$ext = $ext[1];
$fd = fopen($GET[file],'r');
$content = fread($fd, filesize($GET[file]));
fclose($fd);
if ($ext=="jpg") {
header("Content-type: image/jpeg");
}
elseif ($ext=="gif") {
header("Content-type: image/gif");
}
elseif ($ext=="swf") {
header('Content-type: application/x-shockwave-flash');
$content = base64_decode($content);
}
elseif ($ext=="html") {
header("Content-type: text/html");
}
echo $content;
exit();
?>
Any ideas how to make it work ???
Thx