$filename = "data.txt";
$name_var='request';
if (file_exists($filename)) {
$file = fopen($filename, "w+");
} else {
$file = fopen($filename, "w+");
}
$text = '';
foreach($_GET as $key => $value){
$text .= $key .' = '. $value;
}
fwrite($file, $text);
fclose($file);
Я не так писал -__-