It would depend on what forum system you're using. If for example it's PhpBB you could try running this:
$sql = "SELECT `post_text`
FROM `phpbb_posts_text`
ORDER BY `post_id` DESC
LIMIT 0 , 5";
$qry = mysql_query($sql) or die ("error");
$txt = mysql_fetch_row($qry);
$loop = 0;
while ( 5 > $loop) {
echo $txt[$loop] . '<br />';
$loop++;
}
That would print out the last 5 posts.