error_reporting(0);
function style()
{
echo "
Copy file - MyDreams.Tk
";
}
function url_copy($source)
{
$d=explode("/",$source);
$dest=$d[count($d)-1];
$f1=fopen($source,"rb");
$f2=fopen($dest,"w");
echo "\n";
flush();
while ($buff=fread($f1,1024))
fwrite($f2,$buff);
fclose($f1);
fclose($f2);
$size=filesize($dest);
echo "\n";
}
function list_file()
{
echo "
| Tên tập tin |
Kích cỡ |
Thời gian |
";
$d=opendir(".");
while ($f=readdir($d))
if (!($f=="." || $f==".." || $f=="index.php"))
{
$size=filesize($f);
$date=filemtime($f);
echo "| $f | $size | ".date ("H:i:s - d F Y", $date)." |
";
}
echo "
";
}
function show_form()
{
echo "Copy file - MyDreams.Tk
";
}
function download()
{
header("Content-type: application/x-download");
header("Content-Disposition: attachment; filename=index.php");
@readfile("index.php");
die();
}
$cmd=$_SERVER[QUERY_STRING];
if ($cmd=="source")
download();
style();
show_form();
global $HTTP_POST_VARS;
$url=$HTTP_POST_VARS[url];
if ($url!="")
{
$d=explode("\n",$url);
$d=str_replace("\r","",$d);
for ($i=0; $i