debug_flag=true; // $client->proxyhost = 'localhost'; // $client->proxyport = 8080; // print_r($client); // Call the SOAP method // Set method parameters /* * node.load params are * 1- nid => int * 2- fields => array (optional) * Let we call methos twice with & without fields * then we have $param1 & $param2 */ //set $fields this is an optional arg $fields = array('nid', 'title', 'type'); // $fields = array('title'); $key = '42b61dd05eb2cea16614a4270ce7cbd6'; $param1 = array( 'nid'=> 18, //Set nid ); $param2 = array( 'nid'=> 18, 'fields' => $fields ); $param3 = array( 'username'=> 'user', 'password' => 'password' ); // First case echo 'Call node.load without optional params
------------------------------------------------------------------'; // $result = $client->call('node.load', $key, $param1); $result = $client->call('node.load', $param1); echo '
';print_r($result);echo '
'; // Second case echo 'Call node.load with optional params
---------------------------------------------------------------'; $result = $client->call('node.load', $param2); echo '
';print_r($result);echo '
'; // Third case echo 'Call user.login with optional params
---------------------------------------------------------------'; $result = $client->call('user.login', $param3); echo '
';print_r($result);echo '
';