Denemedim fakat çalışması gerekiyor.

NOT: Mysql artık kullanılmıyor bunun yerine ya PDO yada MySQLi kullanmanız gerekiyor. Ben PDO'ya göre kodlarınızı düzenledim.

ayar.php

try {
$db = new PDO("mysql:host=localhost; dbname=yeni; charset=utf8", "root", "");
} catch ( PDOException $e ){
print $e->getMessage();
}
$db->exec("set names utf8");


rss.php

$id = $_GET['id'];
header('Content-Type: text/xml; charset=utf-8', true);
echo '




';

function seo($s) {
$tr = array('&');
$eng = array('&');
$s = str_replace($tr,$eng,$s);
$s = strtolower($s);
$s = trim($s, '');
return $s;
}

$query = $db->query("SELECT * FROM posts order by post_id desc LIMIT 20", PDO::FETCH_ASSOC);
if ( $query->rowCount() ){
foreach( $query as $satir ){

$text=$satir["text"];
$textt=seo($text);
$page_description=$satir["page_description"];
$time=$satir["time"];
$post_id=$satir["post_id"];

echo "
$textt
$time

https://www.siteadi.com/posts/$post_id


";
}
}

echo '



';