It depends on the PHP implementation (your link is not working).
If you use this , then the code is simple:
<?php include("ascii85.php"); $a = new ASCII85(); $uid = "YOUR-UID-AS-A-STRING"; $en = $a->encode($uid); $de = $a->decode($en); echo $en."\n\n".$de;
source share