$bin = base64_decode('wKiAg0uMcKcZqg3nAwMDAg==');
$uid = join(array_map(function($i){return strtoupper(dechex($i));},
unpack("L*", $bin)), "");
print $uid;
see also http://forum.nginx.org/read.php?2,215035
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,58522,218594#msg-218594