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

html rotation

Discussion in 'Black Hat SEO Tools' started by CSalt2, Nov 18, 2009.

  1. CSalt2

    CSalt2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 5, 2009
    Messages:
    753
    Likes Received:
    357
    does anyone know how i can rotate html with a code or something

    I'm trying to have the code automatically rotate through flash banners, but when i use a banner rotator it doesn't perform the function that I'd like it too.
     
    Last edited by a moderator: Nov 18, 2009
  2. oldenstylehats

    oldenstylehats Elite Member Premium Member

    Joined:
    Apr 10, 2008
    Messages:
    1,893
    Likes Received:
    1,196
    This is a pretty ghetto way to go about doing that, but it works.
    PHP:
    <?php
    $embedFlash
    [] = '<code></code>';
    $embedFlash[] = '<code></code>';
    $embedFlash[] = '<code></code>';

    $rotate_count = (count($embedFlash)-1);
    $rotate mt_rand(0,$rotate_count);

    echo 
    $embedFlash[$rotate];

    ?>
    You can add as many $embedFlash[] = 'blah'; lines as you want and it'll rotate them randomly. Make sure that whatever HTML you're embedding only contains double-quotes (") and not single-quotes (') or it'll throw an error.
     
    • Thanks Thanks x 1
  3. SpamHat

    SpamHat Junior Member Premium Member

    Joined:
    Apr 27, 2009
    Messages:
    151
    Likes Received:
    67
    Location:
    UK
    <edit>Damn you beat me to it :D</edit>

    Well if you're using php...

    PHP:

    blah blah some shit

    <?php

    $banners 
    = array(
    '<a href="gay.com">some link</a>',
    '<a href="gay.com">some link</a>',
    '<a href="gay.com">some link</a>'
    );

    shuffle($banners);
    echo 
    $banners[0];

    ?>

    blah blah more shit

     
    • Thanks Thanks x 2
  4. CSalt2

    CSalt2 Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 5, 2009
    Messages:
    753
    Likes Received:
    357
    here's a 50% rotation script gimme shared

    Code:
    <?php
    // Creates random number between 1 and 100
    $rand = rand(1,100);
    
    if ($rand>50){
    ?>
    Flash code here
    <?php
    }else{
    ?>
    Other flash code here
    <?php } ?>