<?php error_reporting(E_ALL);
ini_set('display_errors', true);

 require_once 'XML/RPC.php';

 $rpc_key = '9800a5cbfdfbb54f41023ab2fafbfd2855ff0327'; // Set your rpc_key here
 $upc='639382000393';
 // Setup the URL of the XML-RPC service
 $client = new XML_RPC_Client('/xmlrpc', 'http://www.upcdatabase.com');
 $params = array( new XML_RPC_Value( array(
  'rpc_key' => new XML_RPC_Value($rpc_key, 'string'),
  'upc' => new XML_RPC_Value($upc, 'string'),
  ), 'struct'));
 $msg = new XML_RPC_Message('lookup', $params);
 $resp = $client->send($msg);
 if (!$resp)
            {
  echo 'Communication error: ' . $client->errstr;
  exit;
 }
 if(!$resp->faultCode())
 {
  $val = $resp->value();
  $data = XML_RPC_decode($val);
  echo "<pre>" . print_r($data, true) . "</pre>";
 }else{
  echo 'Fault Code: ' . $resp->faultCode() . "\n";
  echo 'Fault Reason: ' . $resp->faultString() . "\n";
 }
?>