Here it is…
<?php
$path = explode("/",realpath('./'));
$filename = date("Y-m-d_His") . "_" . array_pop($path);
echo "<pre>Compressing ./* to ../${filename}.tgz</pre>";
$output = shell_exec('tar -cvz --exclude "./dotar.php" -f ../' . $filename . '.tgz ./*');
echo "<pre>$output</pre>";
echo "<pre>Done.</pre>";
?>