I think you may experience more luck as :
<?
Function Offer_File($file) {
/* Does the file exist : */
if (!file_exists($file)) { Echo "I am unable to locate said file: $name."; Return 0; }
/* Rudimentary Security Measures */
$file = strip_tags("$file",'');
$file = Str_replace ("<","!",$file);
$file = Str_replace ("script","!",$file);
$file = Str_replace ("language","!",$file);
$file = Str_replace ("javascript","!",$file);
$file = Str_replace ("@","",$file);
$file = Str_replace ("\\","",$file);
$file = Str_replace ("%","",$file);
$file = Str_replace ("..","",$file);
$file = Str_replace ("/","",$file);
if (!file_exists($file)) { Echo "Attempt to circumvent security measures noted."; Return 0; }
/* Our file is now somewhat secure. */
$name = $file;
/* GZ Tarball The File */
Exec("C:\bin\tar.exe -cvf $name.tar $name");
Exec("C:\bin\gzip.exe $name.tar");
/* remove offending files */
/* Exec("rm $name"); */
/* Exec("rm $name.tar"); */
unlink "$name";
unlink "$name.tar";
$name .= '.tar.gz';
?>
Download filename:
<font color=#'ff0000'><?=$name;?></font>
<br/><br/>To begin downloading click <b/>
<font color='#ff0000'>
<a href='$name'>HERE</a>
<?
}
This is much closer to what you need to have to make it work. Make sure you have the GNU standard GZ and TAR. (The linux binaries won't work, use DOS versions compatible iwth your OS.)
TIA 😃
Promethyl