Let Muzodo keep your website up-to-date.
The following example is given in PHP but the principle is the same for any server side code. If you need help setting it up, contact us.
We suggest you proceed in the following way:
As you'll see in the logic below,
<!-------------------------NEW CODE START------------------------------------------->
<h2><a name="performances">Upcoming Performances</a></h2>
<?php
function get_url_contents($url){
$crl = curl_init();
$timeout = 5;
curl_setopt ($crl, CURLOPT_URL,$url);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
$ret = curl_exec($crl);
curl_close($crl);
return $ret;
}
$apikey = "your group API key";
$url = "https://www.muzodo.com/api/v1/group/$apikey/events";
$events = json_decode(stripslashes(get_url_contents($url)));
?>
<table class="performance">
<thead>
<tr>
<th class="performance-date">Date</th>
<th class="performance-location"><u>Performance</u></th>
</tr>
</thead>
<tbody>
<? foreach ($events as $key => $event) {
if ($event->Confirmed == 0 || $event->Cancelled == 1)
continue;
# Note: Private events have their address withheld by the API,
# so you can show those events on your website too.
# Change this logic, per your requirements.
if ($event->EventType != "PUBLIC" && $event->EventType != "PRIVATE")
continue;
?>
<tr>
<td class="performance-date">
<? echo $event->FormattedDate . ", " .
$event->FormattedPlayTime . "-" .
$event->FormattedEndTime ?>
</td>
<td class="performance-location">
<?= $event->Name ?><br />
<?= $event->Address ?>
</td>
</tr>
<? } ?>
</tbody>
</table>
<?php
echo $muzodoWebWidget->getSchemas();
# See http://schema.org/ for details.
# A schema is a machine readable format that
# allows search engines to find details on your events.
?>
<!-------------------------NEW CODE END------------------------------------------->
See here for details on the fields that are available.