How to Show List of Blogger' Labels in Our Server

If you use blogger system, you know it add label and categorizing feature for posts.
And if you use blogspot hosting you able to list all labels beside your blog, but if you have your own hosting just show label in each post. but as you see in my blog I have it !

function get_labels($post_number=true,
$d dir($label_dir);
        while (
false !== ($entry $d->read())) {
$entry=='.' or $entry=='..')

$ret.= "<a href=\"http://yourdomain.com/blog/labels/$entry\" style=\"".
I created it a few month ago and now just copy and past it ! so I don’t remember what is variable $post_number doing ! (surely don’t effect in this function)