Demo entry 6738271

API code

   

Submitted by anonymous on May 03, 2018 at 19:14
Language: PHP. Code size: 483 Bytes.

<?php
$url = "https://api.lib.utah.edu/udn/v1/docs/date/*/03/07";
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $url);

//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// $output contains the output string
$output = curl_exec($ch);

// close curl resource to free up system resources
curl_close($ch);

$response = json_decode($output, true);
//var_dump($response);
$docs = $response["docs"];
?>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).