[Solved] How can the current time be used as a conditional value in php?

Try this $time = strtotime(“now”); // You will get the current time in UNIX timestamp.. if(($time%2)==0){ header (‘Location: http://www.misitio1.com’); }else{ header (‘Location: http://www.misitio2.com’); } If you want to work on the value of the current hour or minute, $hr = date(“H”); //Change it depending on your wish, 12 hr or 24 hr time. This will … Read more