Убийца, так?
[code]
<?php
include_once \'config.php\';
if (isset($_GET[\'b\']))
{
$sql_adm = mysql_query(\"SELECT `result` FROM `zap`\"
;
}
else
{
$sql_adm = mysql_query(\"SELECT `domen` FROM `admin`\"
;
}
if (mysql_num_rows($sql_adm) == 0)
{
exit(\'Error\');
}
else
{
$txt_name = mt_rand(10000, 99999).\'.txt\';
while($out_adm = mysql_fetch_array($sql_adm))
{
$file = fopen(\'temp1/\'.$txt_name, \'a+\');
if (isset($_GET[\'b\']))
{
$mail = $out_adm[\'result\'].\"\\n\";
$mail = array_unique ($mail);
foreach($name as $namekey=>$nameval)
{
$mail .= \'$name[] = \'.$nameval .\'$desc[] = \'.$desc[$namekey] .\";
}
fputs ($file, $mail.\"\\r\\n\"
;
}
else
{
$dom= $out_adm[\'domen\'].\"\\n\";
$resultd = array_unique ($dom);
fputs ($file, $resultd.\"\\r\\n\"
;
}
fflush ($file);
fclose ($file);
}
header(\'Content-type: text/plain\');
header(\'Content-Disposition: attachment; filename=\"\'.$txt_name.\'\"\');
readfile(\'temp1/\'.$txt_name);
exit;
}
?>
[/code]