How do i redirect users to sites at random

If they have JS enabled then:
Code:
<script type="text/javascript">

var urls = new Array("http://www.url1.com/", "http://www.url2.com/");

function redirect()
{
window.location = urls[Math.floor(urls.length*Math.random())];
}

var temp = setInterval("redirect()", 3000);

</script>

Its probably best to do it in PHP though but I dunno exactly how to do variables in PHP, Google it yo!
 
I have a randout.php file that picks from the links in randout.txt file at random. PM me and I'll send you the code.
 
But do a
Code:
<noscript>Please click here to get redirected</noscript>
for people who don't have JS activated.
 
Back
Top