- file_get_contents: documentation ( source)
- json_decode: documentation ( source)
<style>
table {
border-width: 1px 1px 0px 0px;
border-style: solid;
border-color: #777;
border-spacing: 0;
width: 100%;
max-width: 330px;
float: left;
margin: 0 20px 0 0;
}
th {
/*background-color: #eee;*/
color: #fff;
background: #c60000;
text-align: left;
border-width: 0px 0px 1px 1px;
border-style: solid;
border-color: #777;
padding: 0.3em 0.3em 0.3em 1.2em;
}
td {
border-width: 0px 0px 1px 1px;
border-style: solid;
border-color: #777;
padding: 0.3em 0.3em 0.3em 1.2em;
}
tr:nth-child(even) {
background: #fddbdb;
}
</style>
<?php
$json = file_get_contents('https://api.import.io/store/data/2bee4ac0-b3cc-41e8-8043-1aa0df768f63/_query?input/webpage/url=http%3A%2F%2Fbequick.slclubsite.nl%2Findex.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D305%26Itemid%3D179&_user=9db12019-2c63-481e-bfde-83fe95dfb3d0&_apikey=9db120192c63481ebfde83fe95dfb3d0a3825130686f82d9a67f5c0ff3fac070afe8706e3a759af5224a8376b2d66badf05041e272fff574688d31f9cfa65646ba3422bd382c0b6b10f0c033930ee05c');
$obj = json_decode($json, TRUE);
$result = array();
echo '<table><thead><th>Datum</th><th>Naam</th></thead>';
for ($i = 0; $i < count($obj['results']); $i++) {
print '<tr><td>' . $obj['results'][$i]["datum_value"] . '</td><td>' . $obj['results'][$i]["naam_value"] . '</td></tr>';
}