This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: PHP  |  size: 1.12 KB  |  views: 1,750  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $step = $_GET["s"];
  3. $sku = $_GET["b"];
  4. $u = $_GET["u"];
  5. $orderid = $_GET["orderid"];
  6. $bottle = substr($sku,1,1);
  7. if ($step == "0") {
  8.         $random = mt_rand(1, 2);
  9.         switch(TRUE) {
  10.                 case ($random >= 1 and $random <= 1):header('Location: https://www.awebsite.com/a-page1.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);break;
  11.                 case ($random >= 2 and $random <= 2):header('Location: https://www.awebsite.com/a-page2.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);break;
  12.         }
  13. }
  14. elseif ($step == "1") {
  15.         if ($bottle == "1"){
  16.                 header('Location: https://www.awebsite.com/page-1.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  17.         }
  18.         elseif ($bottle == "3"){
  19.                 header('Location: https://www.awebsite.com/page-3.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  20.         }
  21.         elseif ($bottle == "5"){
  22.                 header('Location: https://www.awebsite.com/page-5.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  23.         }
  24.         elseif ($bottle == "7"){
  25.                 header('Location: http://www.awebsite.com/thanks.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  26.         }
  27. }
  28. elseif ($step == "2") {
  29.         header('Location: http://www.awebsite.com/thanks.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  30. }
  31. ?>
clone this paste RAW Paste Data