есть такая функция PHP: function _parse_url ($path) { preg_match ("~(.+)?:\/\/([^\/]+)([^\?]*)[\?]?([^\/]*)~", $path, $arr); if ($arr[0]==''){ return array (path =>$path); } return array (scheme => $arr[1], host => $arr[2], path => $arr[3], query => $arr[4]); } // ôóíêöèÿ âûâîäà function output_r ($path) { $arr = _parse_url($path); $host = $arr[host]; $page = $arr[path]; $query = $arr[query]; if ($query!=''){$page.='?'.$query;} if ($page==''){$page='/';} $fp = @fsockopen ($host, 80, &$errno, &$errstr, 30); // if (!$fp){ return implode ('', @file ($path)); } $request = "GET $page HTTP/1.0\r\n"; $request .= "Host: $host\r\n"; $request .= "Accept: text/html, application/xml;q=0.9, */*;q=0.1\r\n"; $request .= "Accept-Charset: utf-8;q=0.6, *;q=0.1\r\n"; $request .= "Accept-Encoding: deflate, gzip, identity, *;q=0\r\n"; $request .= "Accept-Language: ru\r\n"; $request .= "Connection: close\r\n"; $request .= "Keep-Alive: 300\r\n"; $request .= "Expires: Thu, 01 Jan 1970 00:00:01 GMT\r\n"; $request .= "Cache-Control: no-store, no-cache, must-revalidate\r\n"; $request .= "Pragma: no-cache\r\n"; $request .= "Cookie: income=1\r\n"; $request .= "Referer: [url=http://$host/]http://$host/[/url]\r\n"; $request .= "User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows 98)\r\n"; $request .= "\r\n"; @fwrite ($fp,$request); while ($line = @fgets ($fp, 1024)){ if ( preg_match ("~^[\r]?\n$~i",$line)){$fest='yes';} elseif ($fest=='yes'){$out .= $line;} } return $out;} она отправляет запрос на сервер Так вот. Ответ мне нужно записать в файл В php5 у меня на localhost работает такая функция PHP: file_put_contents('result.xml', output_r ([url=http://domain.ru/index.php?string1=1&string2=2..]http://domain.ru/index.php?string1=1&string2=2..[/url].)); А на сервере PHP4 какую функцию мне использовать? Чтоб он именно ответ XML сохранил Заранее спасибо![/php]