public function putxml() { echo "in here<br />"; exit; $doiList = getDoiListxml(); foreach ($doiList->result() as $doi) { $xml = file_get_contents("http://" . eHOST . eROOT_DIR . "/xml?doi=" . $doi->doi_id); $data = array('datacite_xml' => $xml); $where = "doi_id = '" . $doi->doi_id . "'"; $query_str = $this->db->update_string('doi_objects', $data, $where); $result = $this->db->query($query_str); } }
function putxml() { global $host, $doi_root; $base_url = 'http://' . $host . '/home/dois/'; $CI =& get_instance(); $doiList = getDoiListxml(); foreach ($doiList->result() as $doi) { $xml = file_get_contents($base_url . "/doi_xml.php?doi=" . $doi->doi_id); $data = array('datacite_xml' => $xml); $where = "doi_id = '" . $doi->doi_id . "'"; $query_str = $this->db->update_string('doi_objects', $data, $where); $result = $CI->db->query($query_str); if ($result != 1) { echo 'Error updating object xml ' . $doi->doi_id . '<br/>'; } else { echo 'Updated object xml ' . $doi->doi_id . '<br/>'; } } exit; }