I know this question has been asked here a couple of times, but none of the answers had pleased me. This is because almost all of them involve a huge read / write process re
Non exactly a PHP-answer, but here's how we do it in our asp.net-based forum (I'm affiliated with this product, disclosing that due to the rules)
{ topicID, lastReadMessageID } pairs for every topic the user visits.lastReadMessageID from (2)This has some minor flaws, but it does the job.
PS. Also, some might say that using cookies leaves garbage on the user's computer (I personally hate this), but we found out that an average user tracks about 20 topics tops, so it takes about 10 bytes per topic so it takes less than 200 bytes on the user's harddrive.