<?
require_once('../connect/connect.php');
$dir = 'http://ваш_сайт.ru/';

$r=mysql_query("SELECT * FROM board ORDER BY id DESC LIMIT 1000");
ob_start();
while($rr=mysql_fetch_array($r))
	{
	echo $dir.'items/'.$rr['zag_url'].'_'.$rr['id'];
	echo "\r\n";
	}
$buf = trim(ob_get_contents());
ob_end_clean();
file_put_contents("../Sitemap.txt", $buf);
?> 