Created
January 17, 2012 20:54
-
-
Save moskowite/1628811 to your computer and use it in GitHub Desktop.
SOPA PHP conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('America/Los_Angeles'); | |
$current_time = date('G:i'); | |
$start_time = '08:00'; | |
$end_time = '20:00'; | |
if( $current_time >= $start_time && $current_time <= $end_time ) | |
echo 'SOPA'; | |
else | |
echo 'not SOPA' | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment