<?php
$redirectRatio = 10 ; // as a percent
$redirectURL = "http://www.bing.com" ;
$normalURL = "http://www.google.com" ;
echo (rand(1, 100) > $redirectRatio) ? ($normalURL) : ($redirectURL)
?>
if (Math.floor((Math.random()*10)+1) == 5) window.location = 'http://www.google.com';
if you need EXACTLY 10% you need to keep track of your visitors and make a serverside script: this is a quick hack, but has the advantage of working with minimal hassle. HTH!a href=# onclick=
It means -in layman's terms- you can create a simple html page even on your computer and it'll work just fine from there without the need of anything else. And of course it'll work if uploaded onto your host too. The php solution that fellow @rendesr offered is equally effective and even better if you need to cloak the redirection URL (not possible in a safe way with simple js) but will require you to edit a php file on the server. In any case no big deal.what is a serverside script. Can you help me ? please![]()