This will largely be done with jQuery. It's just a matter of periodically querying the server:
setInterval(function(){
$.post("getUpdates.php", function(response){
showInfoBar(response);
});
}, 10000);
That would request updates every 10 seconds. You could do this once the page loads too. As for the PHP code in getUpdates.php:
if (!isset($_SESSION["userid"]))
die("You are not logged in");
$updates = getUpdatesForUser($_SESSION["userid"]);
if ($updates) {
print json_encode($updates);
} else {
print "No updates";
}
As for the get-updates, you can do that as a table in your database:
userid | time | updatemsg
-------------------------------------------------------------
28 | 2009-08-21 12:53:02 | You've received the 'uber' badge.
Getting a users updates is as easy as querying this table for all new updates. You could create a field to indicate when an update has been sent, and should not be sent again.
This is all very thrown-together, but should give you a very basic idea of how to accomplish it.