annie88,
<form method="post" action="gettxt.php" target="gettxt">
<textarea name="text"></textarea>
<input type="submit" value="Скачать TXT">
<iframe name="gettxt" src="" style="display:none"></iframe>
</form>
gettxt.php
<?php
header('Content-type: text/plain; charset=utf8');
header('Content-disposition: attachment; filename='.date('YmdHis').'.txt');
echo $_POST['text'];
?>