<?php ini_set("display_errors", 'Off'); include_once "functions.php"; include_once "class.IniFile.php"; include_once "class.RequestVars.php"; require_once "class.SciELOInstances.php"; $iniObj = new IniFile("ini/stat.ini"); $iniArr = $iniObj->parse(); $xml_node_ini = $iniObj->getXML(); $requestVars = new RequestVars(); $xml_node_request_vars = $requestVars->getVarsXml(); $array_request_vars = $requestVars->getVarsArray(); /* * eliminar a passagem de parametros * server_action e xml * por motivo de seguranca * */ $pair_state_action = array("02" => "", "16" => "", "17" => "7", "03" => "", "15" => "1", "04" => "", "05" => "1_2", "18" => "", "19" => "1_3", "08" => "3", "07" => "", "09" => "", "10" => "6", "11" => "", "13" => "5out", "12" => "5"); if ($array_request_vars["state"] != "" && array_key_exists($state, $pair_state_action)) { $state = $array_request_vars["state"]; } else { //echo("Warning: no state was defined, so default 02 is runing the business..."); $state = "02"; } /* tratamento de idioma */ if ($array_request_vars['lang'] != 'en' && $array_request_vars['lang'] != 'es' && $array_request_vars['lang'] != 'pt') { $array_request_vars['lang'] = 'en'; } /* obtencao da data de processamento */
<?php include_once "functions.php"; include_once "class.IniFile.php"; $iniObj = new IniFile("ini/stat.ini"); $iniArr = $iniObj->parse(); $xml_node = $iniObj->getXML(); $xml = XML_HEADER . $xml_node; die($xml); $url = "http://serverofi.bireme.br:2424/xml/02.xml"; //echo("\$url: |" . $url . "|"); //die(); // Ha´ dois tipos de XML, as estaticas e as criadas dinamicamente // Dependendo dessas duas opcoes, escolhemos o a funcao para conseguir // o XML que e´ mais adequada: // XML estatico (url NAO contem o sinal '?') -> getXML($url); // XML dinamico (url contem o sinal '?') -> document_post($url); $pos = strpos($url, "?"); if ($pos === false) { // NAO contem o sinal '?'... $xml_content = getXML($url); } else { $xml_content = document_post($url); } // Faz a transformacao se nao for debug=xml if ($debug == "xml") { die($xml_content); } else { $xml_content = trim($xml_content); //echo("\$xml_content: |" . $xml_content . "|"); //$state = "getRoot";