usually i use this at the end of a link to pass the s,p,x,hid vars

index.php?S=<?php echo $GET['S']?>&P=<?php echo $GET['P']?>&X=<?php echo $GET['X']?>&hid=<?php echo $GET['hid']?>

but i now i am using a URL rotator and need to still pass these vars. How do i do that with the current script i am using:

<?php


$sites[0] = array("www.mysite.com/index.php?", 5);
$sites[1] = array("www.myothersite.com/traffic.asp?", 1);

$countsites = count($sites);

for($i=0; $i<$countsites; $i++)
{
for($x=0; $x<$sites[$i][1]; $x++)
{
$mylist[] = array($sites[$i][0]);
}
}

$countlist = count($mylist);

$countlist = $countlist - 1;

$picker = rand(0, $countlist);

$picked = $mylist[$picker][0];

header("Location: http://" . $picked);

?>

Thanks
-Hector

    $vars='S='.$_GET['S'].'&P='.$_GET['P'].'&X='.$_GET['X'].'&hid='.$_GET['hid'];
    
    header("Location: http://" . $picked.$vars); 
    
    
      Write a Reply...