PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/call_ikku.php

https://bitbucket.org/nonbjam/5330407081-lab9
PHP | 17 lines | 17 code | 0 blank | 0 comment | 0 complexity | e6c21bcc5a3f044a11b35e30d5dd8e3b MD5 | raw file
 1<?php
 2header("context-type:text/html;charset=UTF-8");
 3$count = 1;
 4$url="http://www.kku.ac.th/ikku/api/activities/services/topActivity.php";
 5$json = file_get_contents($url); 
 6$data = json_decode($json, true);
 7echo "<table>";
 8foreach($data['activities'] as $item) {		
 9	echo "<tr>";
10	echo "<td>".$count.". "."</td>";
11	echo "<td>".$item['title']."</td>";
12	echo "<td>".$item['dateSt']."</td>";
13	echo "</tr>";	
14	$count++;	
15}
16echo "</table>";
17?>