new XML_RPC_Value($rpc_key, 'string'), 'upc' => new XML_RPC_Value($_REQUEST['upc'], 'string'), ), 'struct')); // Construct the XML-RPC request. Substitute your chosen method name $msg = new XML_RPC_Message('lookup', $params); //Set debug info to true. Useful for testing, shows the response from the server // $client->setDebug(1); //More debug info, create the payload before sending. //Not necessary to function, but useful to test // $msg->createPayload(); //TEST Print the response to the screen for testing // echo "
" . print_r($msg->payload, true) . "
" . print_r($data, true) . ""; }else{ //If something went wrong, show the error echo 'Fault Code: ' . $resp->faultCode() . "\n"; echo 'Fault Reason: ' . $resp->faultString() . "\n"; } ?>