php mysql rest api example