Random Choices: Flip a Coin

From CodeCodex

// get the current server time in seconds
$now_seconds = date("s");
// see if it's even or odd 
if(($now_seconds - (2 * floor($now_seconds/2))) == 0) 
{ 
  // the number is even 
}
else 
{ 
  // the number is odd 
} 

/* that's it! You've flipped a coin.
   See a working version here:
   http://www.i-fubar.com/flip-a-coin-script.php
   Includes a way to flip a 3-sided coin, too.
*/