/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$user = 'webservice'; #username (host site). $password = 'webservice'; #pass (host site). $xmlrpc_url = 'http://localhost/services.sandbox/services/xmlrpc'; #url to find the web services $session_id = xmlrpc($xmlrpc_url, 'system.connect'); $authenticated_session = xmlrpc($xmlrpc_url, 'user.login', $session_id['sessid'], $user, $password); $xmlrpc_result = xmlrpc($xmlrpc_url, 'node.get', $authenticated_session['sessid'], 1); if ($xmlrpc_result === FALSE) { } else { }