PHP JSON RPC Library adapted from http://jsonrpcphp.org/