Sorry for joining so late to the discussion.
We’ve already done some work in order to connect to Tryton using JSONRPC with PHP.
I created this snippet where you can find a library (modified version of an existing one) as well as a command line example (works with both HTTP & HTTPS):
https://bitbucket.org/snippets/nantic/Le9Mnj
Hope it helps!