Skip to content

Instantly share code, notes, and snippets.

@moskowite
Created January 17, 2012 20:54
Show Gist options
  • Save moskowite/1628811 to your computer and use it in GitHub Desktop.
Save moskowite/1628811 to your computer and use it in GitHub Desktop.
SOPA PHP conditional
<?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