Hi,
The school that I work at wants to prevent students from looking at our internal photo galleries during lession time, so I've been asked to restrict the times users can access certain pages on our Intranet.
I'm using;
Code:
<?php
$greenwich = (int) gmdate('Gi');
if (($greenwich >= 0100) and ($greenwich <= 0855)) {
header('Location: http://intranet/images/photogalleries/wexp2005DnD/default89.htm');
} else {
header('Location: http://intranet/images/photogalleries/wexp2005DnD/time.htm');
}
?>
I'm not that falimiar with PHP, so have been using multiple single files to filter access for different times of day. Is there any way of using a single PHP file to filter page access at different times of day?
The other problem is that I can't get this to allow students to access the restricted pages. It doesn't like times before 1000, so the example above always sends them to the time.htm file (a note telling them that it is the wring time of day to access the pages.)