code: $path = "http://mywebsite.com/"; if($_GET['picture']=="avatar"){ $av[17] = "avatar17.gif"; $av[16] = "avatar16.png"; $av[15] = "avatar15.png"; $av[14] = "avatar14.png"; $av[13] = "avatar13.png"; $av[12] = "avatar12.png"; $av[11] = "avatar11.png"; $av[10] = "avatar10.png"; $av[9] = "avatar9.png"; $av[8] = "avatar8.png"; $av[7] = "avatar7.png"; $av[6] = "avatar6.png"; $av[5] = "avatar5.png"; $av[4] = "avatar4.png"; $av[3] = "avatar3.png"; $av[2] = "avatar2.png"; $av[1] = "avatar1.png"; $av[0] = "avatar0.jpg"; header("Location: ".$path.$av[rand(0,count($av))]); }else if($_GET['picture']=="signature"){ $sig[0] = "signature0.png"; header("Location: ".$path.$sig[rand(0,count($sig))]); }