Skip to content

Instantly share code, notes, and snippets.

@kmelve
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmelve/0eddcac03993b220b217 to your computer and use it in GitHub Desktop.
Save kmelve/0eddcac03993b220b217 to your computer and use it in GitHub Desktop.
HF Ti nyeste artikler i CRIStin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Nyeste artikler fra HF</title>
</head>
<body>
<pre>
<?php
function cristin($url) {
$json = file_get_contents($url);
return json_decode($json, true);
}
$url = "http://cristin.no/ws/hentVarbeidSted?instnr=184&avdnr=11&utplukk=nyeste&maksantall=10&format=json";
$array = cristin($url);
$resultater = array();
foreach($array["forskningsresultat"] as $p) {
array_push($resultater, $p["fellesdata"]);
}
print_r($resultater);
?>
</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment