Sasl digest md-5

can anyone point me to a good tutorial with step by step instructions on how to properly build a response to the digest-md5 sasl challenge over http using php? ive been referred to ready made classes before, but im having trouble deciphering exactly whats going on, so a step by step would be a huge help, thanks!