<html>
<head></head>
<body>
<?php
$link = mysql_connect('localhost', 'username', 'password');
if( !$link )
die('Could not connect: ' . mysql_error());
mysql_select_db('phpbb', $link);
$result = mysql_query("
SELECT
topic.topic_title AS thread, post.post_username AS poster,
CONCAT(SUBSTRING(text.post_text, 1, 75), '...') AS content
FROM
phpbb_posts AS post, phpbb_posts_text AS text, phpbb_topics AS topic
WHERE
post.post_id = text.post_id
AND topic.topic_id = post.topic_id
ORDER BY
post.post_time DESC
LIMIT 5
");
while( $row = mysql_fetch_array($result) ) {
echo "
<div class='post'>
<p>Posted in {$row['thread']} by {$row['poster']}</h4>
<p>{$row['content']}</p>
</div>
";
}
?>
</body></html>