client = new XML_RPC_Client( $this->SERVER_PATH, $this->SERVER_NAME, $this->SERVER_PORT ); } /** * Takes an array of request data. * Returns the XML-RPC result. */ function make_request( $method, $methodParams ) { // automatically add our required Oodle API Key onto every query $params = array(XML_RPC_encode($methodParams)); // make the request to the Oodle API $request = new XML_RPC_Message($method,$params); $response = $this->client->send($request); // quick error handling if ($response->faultCode()) { // error handling - print error code and error message print "Error retrieving data: " . $response->faultCode() . "\n"; print "Error message: " . $response->faultString() . "\n"; return; } // the actual listings data return by Oodle is here $results = XML_RPC_decode($response->value()); return $results; } } ?>