Skip to content

Instantly share code, notes, and snippets.

@figureone
Created December 5, 2012 02:20
Show Gist options
  • Save figureone/4211549 to your computer and use it in GitHub Desktop.
Save figureone/4211549 to your computer and use it in GitHub Desktop.
Retrieves publications stored in LDAP via API
<?php global $user; ?>
<h2>Academics Productivity Summary</h2>
<p>Hello, <?php print $user->name; ?>. Here are your publications we have on record:</p>
<?php
$api_url = "http://os-133-7/reportserverapi/reports/PublicationsByPerson.php?outputType=JSON&person=evaponte&pubType=Journal%20Article";
$api_response = file_get_contents($api_url);
$api_response_json = json_decode($api_response);
$publications = $api_response_json->results;
?>
<ul>
<?php foreach ($publications->pub_list as $publication): ?>
<li><?php print $publication->pub_title; ?></li>
<?php endforeach; ?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment