Skip to content

Instantly share code, notes, and snippets.

@underdown
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save underdown/acb3e6bbbec97e636dc7 to your computer and use it in GitHub Desktop.

Select an option

Save underdown/acb3e6bbbec97e636dc7 to your computer and use it in GitHub Desktop.
simple split test w/php
<?php
if ($_COOKIE['test'] == '1')
header("Location: http://new.seartcoversunlmited.com");
if (rand(1, 100) > 75){
setcookie("test", 1, time()-(60*60*24*14));
header("Location: http://new.seatcoversunlimited.com");
}else{
setcookie("test", 0, time()-(60*60*24*14));
// echo "tested";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment