In your php page you need to include the main.inc.php file and do a call to authenticate().
Then {$user['U_Username']} will contain the user's name.
Also, if you search at
www.threadsdev.com there are a couple of modifications for the DigiChat software. That will get you going and give you an example for sure. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />