api.php 644 Bytes
<?php
$id = $_GET["id"];
$type = $_GET["type"];
$start = $_GET["start"];
$count = 100;
$url = 'https://api.researchmap.jp/opensearch/kakenid/' . $id . '?appid=nifs-k_lmvoxe7d10lm';

if (!empty($type)) {
  $url = $url . '&type=' . $type. '&display=' . $type . '&count=' . $count;
};

if (!empty($start)) {
  $url = $url . '&start=' . $start;
}

$feed = file_get_contents($url);
$feed = str_replace('rm:', 'rm-', $feed);
$feed = str_replace('xml:', 'xml-', $feed);

header('Content-Type: application/xml; charset=utf8');
header('Access-Control-Allow-Origin: https://www.nifs-k.ac.jp');
// header('Access-Control-Allow-Origin: *');
echo $feed;
?>