Very nice, that's just what I was after, no need for all those over the top Libraries for json rpc 2.0

I hacked it a bit so you can work with posted data like so:

$json_req['params'] = $myParams;
$json_req['jsonrpc'] = '2.0';
$json_req['method'] = 'myMethod';
$json_req['id'] = 1;
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($json_req));

Thanks again!