Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 835 Bytes
header('Content-type: application/json; charset=utf-8');
// load the shared functions into the global scope
// these happen to be the functions related to specification examples
// but normally you would load your custom functions here
// load the base jsonrpc2 processing class
// load the transport processing layer, extends base class
// create a instance of the transport layer, with method maps
$server = new transport_http(
'subtract' => 'subtract',
'sum' => 'sum',
'notify_hello' => 'notify_hello',
'notify_sum' => 'notify_sum',
'get_data' => 'get_data'
// add additional query string keys to check, if so desired
$server->keys[] = 'msg';
print $server->process();
Something went wrong with that request. Please try again.