1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A link redirected 10 %

Discussion in 'Black Hat SEO' started by thami, Jun 17, 2012.

  1. thami

    thami Newbie

    Joined:
    May 26, 2008
    Messages:
    18
    Likes Received:
    1
    Hi,
    i´m looking for a script. I have a site, and there is a link. When the user click the link, i will that only 10 % redirected forward.

    Can anybody help me ?

    Thanks thami
     
  2. thami

    thami Newbie

    Joined:
    May 26, 2008
    Messages:
    18
    Likes Received:
    1
    I think, every cookiestuffing script have it.
     
  3. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    Something like this will get you started on writing your own. Hope it's useful...

    PHP:
    <?php 

    $redirectRatio 
    10 // as a percent
    $redirectURL "http://www.bing.com" ;
    $normalURL "http://www.google.com" ;

    echo (
    rand(1100) > $redirectRatio) ? ($normalURL) : ($redirectURL)

    ?>
     
  4. sirgold

    sirgold Supreme Member

    Joined:
    Jun 25, 2010
    Messages:
    1,260
    Likes Received:
    645
    Occupation:
    Busy proving the Pareto principle right
    Location:
    A hot one
    Not *exactly* what u're asking but good enough as a starting point... ;)
    Code:
    if (Math.floor((Math.random()*10)+1) == 5) window.location = 'http://www.google.com';
    Haven't tested it, just going by heart but should work. Put it in the onclick section and change google to whatever your redirection URL is:
    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!
     
    Last edited: Jun 17, 2012
  5. thami

    thami Newbie

    Joined:
    May 26, 2008
    Messages:
    18
    Likes Received:
    1
    Hi, and thanks for the speed answers. If i understand it right ?

    When a user click the link, and he is in the 10 % ratio, then the script is redirected to bing.com
    Is the ratio over 10 % he is redirected to google.com ?

    I made a site, and there 100 user click a link. And the script redirected 10 user to bing.com
    and 90 user to google.com ?
     
  6. thami

    thami Newbie

    Joined:
    May 26, 2008
    Messages:
    18
    Likes Received:
    1
    what is a serverside script. Can you help me ? please :confused:
     
  7. ficfroc

    ficfroc Regular Member

    Joined:
    Feb 14, 2010
    Messages:
    475
    Likes Received:
    267
    Location:
    Sous Les Etoiles
    A serverside script is a script that executes on the server : for example PHP > means that the user connecting to your website won't view the script but only it results once the server has executed it.

    Javascript isn't a server side script as the user's browser 'downloads' the script, then executes it on his own computer. This is why you msut have java installed on your computer to view some sites.
     
  8. sirgold

    sirgold Supreme Member

    Joined:
    Jun 25, 2010
    Messages:
    1,260
    Likes Received:
    645
    Occupation:
    Busy proving the Pareto principle right
    Location:
    A hot one
    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.