- $data = file_get_contents("http://www.1823.gov.hk/common/ical/gc/en.ics");
+ $data = file_get_contents("https://www.1823.gov.hk/common/ical/gc/en.ics", false,
+ stream_context_create(array(
+ "ssl"=>array(
+ "verify_peer"=>false,
+ "verify_peer_name"=>false,
+ ),
+ ))
+ );
$vevents = explode('BEGIN:VEVENT', $data);
}
}
+ function isHoliday($country, $date)
+ {
+ $d = DB_DataObject::Factory('core_holiday');
+ $d->country = $country;
+ $d->holiday_date = $date;
+ return $d->count();
+ }
}