I would like a feature that allowed guests to view a determined number of posts per visit or per day, and then require them to register to go any further.
Use a SESSION variable and increase it when a post is displayed. If past redirect them to the registration screen. Here's an example of what I use, same concept, but to limit searches to one per 60 seconds.
// Require guests to wait sixty seconds between searches.
if($user_info['is_guest'])
{
$time = time();
if(!isset($_SESSION['last_search']) || ($_SESSION['last_search'] + 60 < $time))
$_SESSION['last_search'] = $time;
else
{
$txt['guest_search_limit'] = preg_replace('/WAIT/', ($_SESSION['last_search'] + 60) - $time, $txt['guest_search_limit']);
fatal_lang_error('guest_search_limit', false);
}
}
How would I apply that to viewing posts?
Do note though this will also limit Search Engine Spiders in the same way.
But do not attempt to give search engine robots unlimited access as that would be contrary to their Terms of Service.