I have the following script:
[code]<?php
$filename = $_GET[‘filename’];
if (empty($filename))
{
?>
else
{
if (strpos($filename,".zip") >= 1)
{
exec(‘unzip $filename’,$ret);
echo “Successful unzipping”;
$url = str_ireplace(".zip","","$filename");
echo ‘’;
}
elseif ((strpos($filename,".tgz") >= 1) || (strpos($filename,".tar.gz") >= 1))
{
exec(‘tar -xzf gammu-1.10.0.tar.gz’,$ret);
echo “Successful untargzing”;
if ((strpos($filename,".tgz") >= 1))
{
$url = str_ireplace(".tgz","","$filename");
echo ‘’;
}
else
{
$url = str_ireplace(".tar.gz","","$filename");
echo ‘’;
}
}
else
{
?>
The point is, that after decompressingg, it should take you to the new uncompressed directory, and, for obvious reasons, I can’t use headers, but on the other hand, I don’t want to be redirected, as I am now, to http://www.argendeli.net/$filename
How do I redirect in the places where I have redirect code right now, after 11/2 - 2 seconds, and actually have $filename replaced with its contents.