User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
code:xmlrpc-php [2009/02/23 00:00]
code:xmlrpc-php [2009/02/23 09:02]
pkubanek created rts2phplib page
Line 1: Line 1:
 +====== How to use the XML-RPC interface within PHP ======
 +It should be relatively straight forward. Just:
 +<code bash>
 +svn co https://​​svnroot/​rts-2/​trunk/​rts2phplib rts2phplib
 +You most probably will need [[http://​​|PHP XML-RPC library]]. Debian package is called php5-xmlrpc.
 +Then you can see either example included in [[http://​​viewvc/​rts-2/​trunk/​rts2phplib/​rts2.php?​view=markup|rts2phplib/​rts2.php]],​ or use code provided bellow to start with the library:
 +<code php>
 + // make sure that file rts2phplib/​ exists in your PHP script directory
 + ​include('​rts2phplib/​'​);​
 + // create rc - rts2 client - object
 + $rc = new rts2xmlrpc('​localhost',​ 8889);
 + // print some values..
 + print '<​hr/>​Value of T0.OBJ:'​ . $rc->​valueOf('​T0',​ '​OBJ'​) . '<​br/>';​
 + print 'Value of T0.infotime:'​ . $rc->​valueOf('​T0',​ '​infotime'​) . '<​br/>';​
code/xmlrpc-php.txt ยท Last modified: 2009/02/23 00:00 (external edit)