PHP API Class