<?php
$firstWeekDates = array();
$firstWeekDay = date('w',strtotime(date("Y-m-01")));
for($i = 1; $i <= 7 - $firstWeekDay; $i++){
$firstWeekDates[] = date('Y-m-0'.$i);
}
if(!in_array(date('Y-m-d'), $firstWeekDates)){
echo 'Maaf batas waktu akses telah lewat!';
exit;
}
// do something else
?>