tes

[insert_php]

$id = $_GET[‘sinta’];
$json_dosen = curl_data(‘http://sintadev.ristekdikti.go.id/api/select?id=’.$id.’&api_key=a39e735fd5049ba1f7ff0b4e05c9f207′);

$data = $json_dosen[‘data’];
echo “Fullname : “.$data[‘fullname’].”
“;
echo “NIDN : “.$data[‘NIDN’].”
“;
echo “Sinta Score : “.$data[‘sinta_score’].”

“;

$json_gsdoc = curl_data(‘http://sinta2.ristekdikti.go.id/api/gsdocs?id=’.$id.’&api_key=a39e735fd5049ba1f7ff0b4e05c9f207&offset=0&limit=20′);

$dat = $json_gsdoc[‘data’];
echo “

Publication Google Scholar

“;
$i=1;
foreach($dat as $doc) :
echo $i.”. “.$doc[‘title’].”
“;
echo “Journal : “.$doc[‘jurnal_name’].”
“;
echo “
“;
$i++;
endforeach;

function curl_data($url){
if (!function_exists(‘curl_init’)){
die(‘Sorry cURL is not installed!’);
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$output = curl_exec($ch);
curl_close($ch);

$json = json_decode($output, true);
return $json;
}
[/insert_php]