Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pages = array(
- "buy1.html",
- "buy2.html"
- );
- if (!isset($_COOKIE['bpm_buy'])){
- $n = count($pages);
- $go = rand(1,$n);
- setcookie("bpm_buy", $go, time()+60*60*24*7);
- }else{
- $go = $_COOKIE['bpm_buy'];
- }
- header('Location: '. $pages[$go-1]);
- ?>
- /////////////// I NEED TO PASS QUERY STRING TO THE REDIRECT. THIS IS
- //////////////// NOT WORKING: header('Location: '. $pages[$go-1]) . $_SERVER['QUERY_STRING']);
Add Comment
Please, Sign In to add comment