php -f rescript.php <appkey> <sessiontoken>
Dealing with SSL in PHP
If you have errors relating to SSL certificate issues then you must do one of the following:
1) Quick fix for testing applications, should not be used in production as it may leave you exposed to man in the middle type attacks:
Add the following two lines to the sportsApingRequest function after the curl_init:
2) Correct fix for production applications:
You will need to make use of the CURLOPT_CAINFO option, and point it to the Betfair PEM formatted certificate (which you can export from your browser). The details of exporting the cert and using this option are beyond the scope of this document but can be found elsewhere online.
Calling API-NG with JSON-RPC protocol