Skip to content

Instantly share code, notes, and snippets.

@breyten

breyten/nos.php Secret

Created Jun 28, 2013
Embed
What would you like to do?
Get the latest videos on NOS
<html>
<head>
<title>Open NOS</title>
</head>
<body>
<h1>Open NOS</h1>
<?php
$api_key = '61e8287ccd66ff81700fe01d250cb34c';
$output = file_get_contents("http://open.nos.nl/v1/latest/video/key/$api_key/output/json/category/nieuws/");
//echo $output;
$data = json_decode($output);
foreach($data->latest_video as $video) {
print '<div class="item">';
print '<h2>'. $video->title .'</h2>';
print $video->embedcode;
print "</div>";
}
//var_dump($data);
?>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment