<?php

$tanggal_awal     = date('d/m/Y');
$data["TANGGAL_AWAL"]  = $tanggal_awal;
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => '103.255.241.146/api/d_reg_online/tampil_antrean_poliklinik',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
));

$response = curl_exec($curl);

curl_close($curl);
$json1 =  str_replace('\r\n     ', "---0", $response);
$json1 =  str_replace('\r\n', "---", $json1);
$json1 = json_decode($json1);
?>

<?php $i = 1; ?>
<?php foreach ($json1->response as $a) : ?>
    <tr>
        <td width="25%">
            <strong>
                <?= $a->nm_dokter; ?>
            </strong>
        </td>
        <td width="20%"><strong>
                <?= $a->nm_poliklinik; ?>
            </strong></td>
        <td width="20%"><strong>
                <?= $a->jadwal_poli; ?>
            </strong></td>
        <td width="10%">
            <center>
                <strong><?= $a->daftar; ?></strong>
            </center>
        </td>
        <td width="11%">
            <center>
                <strong><?= $a->terlayani; ?></strong>
            </center>
        </td>
        <td width="8%">
            <center>
                <strong><?= $a->batal; ?></strong>
            </center>
        </td>
    </tr>
<?php endforeach ?>