PHP API and MySQL database
a first version of the php api, not yet fully working nor implemented