1. Go to this page and download the library: Download afiqiqmal/esolat-malaysia library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$data = (new WaktuSolat())
->zone('PNG01')
->displayAs(Period:WEEK)
->fetch();
$response = esolat()
->timeline()
->zone('PNG01') // P1 or PNG01
->displayAs(Period::DAY)
->setDate('2018-10-10') // if this is not set, it will automatically get current date
->fetch();
$response = esolat()
->timeline()
->zone('PNG01') // P1 or PNG01
->displayAs(Period::Week)
->setDate('2018-10-10') //if this is set, it will display the date range of startof week to end of week of the date
->fetch();