PHP implementation of an OATH service