function get_id_hash($id) { // hash the id $hash = hash('sha256', (string) $id); // take first 8 characters, convert to int $hash_num = hexdec(substr($hash, 0, 8)); // base62 encode $surl = base62_encode($hash_num); return $surl; }
private function replyCommand() { $topicHash = base62_encode($this->topic->topic_id); return "/msg #support !reply {$topicHash} <text>"; }