I am trying to block access to my page a bit and I have already managed to do it for hours using this script.
date_default_timezone_set('America/Manaus');
$hInicio = 17; // Está en 24 hrs
$hFin = 7;
$h = date("G"); // Hora actual en 24 hrs
$realh = (int)$h;
//se toma la ultima hora de trabajo (las 5pm) para hacer el bloqueo inicial hasta que llegue a las 12
//luego el bloqueo de fin desde las 0 horas hasta las 7pm hora de inicio
// var_dump((int)date("G"));
if ($realh >= $hInicio && $realh <= $hFin) header("location: bloqueo.html");
The first data is that the user is redirected to a web that does not exist when the web page is out of its schedule. Configure my HTACESS so that when there is a web page that does not know what will be forwarded at the beginning, but the start can not access it and it is sent again to the file that does not exist which makes the HTACCESS do its thing again and so ...
My question is: Is it safe to do that? Can I try the hackers in this very elaborate way? Thank you for your visit and I thank you for the response.