/** * A function to handle XML-RPC advertisement view requests. 2.0 version * * @deprecated * * @param XML_RPC_Message $params * @return XML_RPC_Response */ function OA_Delivery_XmlRpc_View_PAN($params) { // Extract the remote_info parameter $remoteInfoXmlRpcValue = $params->getParam(0); $remote_info = XML_RPC_Decode($params->getParam(0)); // Add empty cookies array $remote_info['cookies'] = array(); // Create environment array $remoteInfoXmlRpcValue = XML_RPC_encode($remote_info); // Extract the context param if ($params->getNumParams() > 6) { $contextXmlRpcValue = $params->getParam(6); } else { $contextXmlRpcValue = new XML_RPC_Value(array(), $XML_RPC_Array); } // Recreate XML-RPC message $msg = new XML_RPC_Message('phpAds.view', array($remoteInfoXmlRpcValue, $params->getParam(1), $params->getParam(2), $params->getParam(3), $params->getParam(4), $params->getParam(5), $contextXmlRpcValue)); // Relay call to openads.view $xmlResponse = OA_Delivery_XmlRpc_View($msg); // Check for errors as-is return $xmlResponse; }
function OA_Delivery_XmlRpc_View_PAN($params) { $remoteInfoXmlRpcValue = $params->getParam(0); $remote_info = XML_RPC_Decode($params->getParam(0)); $remote_info['cookies'] = array(); $remoteInfoXmlRpcValue = XML_RPC_encode($remote_info); if ($params->getNumParams() > 6) { $contextXmlRpcValue = $params->getParam(6); } else { $contextXmlRpcValue = new XML_RPC_Value(array(), $XML_RPC_Array); } $msg = new XML_RPC_Message('phpAds.view', array($remoteInfoXmlRpcValue, $params->getParam(1), $params->getParam(2), $params->getParam(3), $params->getParam(4), $params->getParam(5), $contextXmlRpcValue)); $xmlResponse = OA_Delivery_XmlRpc_View($msg); return $xmlResponse; }