Run code on the specified day/time

<?php //Get current(server) time | 24-hour format $currentTime = date(G); //Textual representation of a day (three letters Mon - Sun) $dayOfTheWeek = date(D); //perform the check if condition is true run the code otherwise skip if ($currentTime >= 10 && $currentTime < 14 && $dayOfTheWeek == "Sun") { // run your code } ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.