$a = array("example1.com/index.php?id=1234","example1.com/index.php?id=1234","example1.com/index.php?id=5678","example1.com/index.php?id=5678","example1.com/index.php?id=5678");
$rand = array_rand($a, 3);
foreach ($rand as $key => $value) {
echo $a[$value]."
";
}