Page 1 of 1

Including with zip files?

Posted: Sun Feb 23, 2003 2:09 pm
by Pocketx
Hello, I have this code so I can use it for downloading files

<?php
switch($download)
{
case '1':
include('./resources/backdrops/1.zip');
break;

default:
include('./blank.html');
break;

}
?>

But when i try index.php?download=1, it shows a bundent of words. Is this possible without using those browser heading stuff?

Posted: Sun Feb 23, 2003 2:26 pm
by RedDragon
you can try using javascript

Code: Select all

<?php

print <<<EOT
<script type="text/javascript" language="JavaScript">
function redirect() {
  window.location.replace("http://www.domain.com/file.zip");
}
setTimeout("redirect();", 2000);
</script>
EOT;

?>

Posted: Sun Feb 23, 2003 2:51 pm
by Pocketx
But how do i link it so i can download it?

And i want it to be like ?download=1 ect.