check out the similar_text function
http://jp2.php.net/manual/en/function.similar-text.php
or maybe split each word by spaces and caculate the relation with your own algorithm.
and if your able to add a table to mysql, you should create a table that holds the calculated relation of each post.
CREATE TABLE blog_table.`posts_relation` (
`post_id` INT UNSIGNED NOT NULL ,
`related_post_id` INT UNSIGNED NOT NULL ,
`relation` FLOAT UNSIGNED NOT NULL ,
INDEX ( `post_id` , `related_post_id` )
)
update each time you add a post, or maybe once a day.
and grab your results with something like
SELECT posts.* FROM posts, posts_relation WHERE posts_relation.post_id = {$post_id} AND posts.post_id = posts_relation.related_post_id ORDER BY posts_relation.relation DESC LIMIT 5