3){
echo'Превышен лимит ошибок!';
exit();
}
}
else{
$_SESSION['error']=0;
}
if(isset($_GET['clear'])){
$arr=file('database.dat');
for($i=0;$iЗаполните все поля ввода!';
exit();
}
$file=file_get_contents('http://' . $_GET['link']);
if(strlen($file)>(1024*1024)){
$_SESSION['error']++;
echo'Файл слишком большой! Осталось' . (3-$_SESSION['error']) . 'попыток';
exit();
}
echo'
Loaded this file
';
if(!file_exists('database.dat')){
$f= fopen('database.dat', 'w');
fclose($f);
echo'
База данных создана
';
}
$fp=fopen('database.dat', 'at');
fwrite($fp, $_GET['name'] . "\r\n");
fclose($fp);
$size=file_put_contents($_GET['name'], $file);h
echo 'Скачать (' . ($size/1024) . ' Kb)';
}
else{
echo'