help with redirect script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help with redirect script

    hi this is the script im using to redirect traffic to my other sites but it doesnt work correctly please can someone help

    $rand=rand(1,10);
    if ($rand==1) {
    $link_go='http://friend1.com';
    }
    else if ($rand==2) {
    $link_go='http://friendy2.com';
    }

    header("Location: $link_go");
    ?>

    #2
    Try this:
    PHP Code:
    <?php
    $gpc 
    rand(0,1);
    switch(
    $gpc)
    {
     case 
    "1":
     
    header('Location: http://siteone.com');
     break;
     default:
     
    header('Location: http://sitetwo.com');
     break;
    }

    Comment


      #3
      also i want 10% to go to the first link another 10% to go to the 2nd link and then i want the remainder to just stay on the page.. will that allow me to do that?

      Comment

      Working...
      X