Well, first you'd want to find the timestamp for the start and end times. Couple ways to do this, but for this example, we'll use mktime....
/* 7:00 AM */
$start = mktime(7, 0, 0, date("m"), date("d"), date("Y"));
/* 5:30 PM */
$end = mktime(17, 30, 0, date("m"), date("d"), date("Y"));
/* Current */
$now = time();
/* Check for validation */
if($now > $start && $now < $end) {
// ok
}
else {
// not ok
}