A PHP class for talking to a MySQL database by sending and receiving JSON