iframe rotator script?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spudman
    Confirmed User
    • Aug 2002
    • 3198

    #1

    iframe rotator script?

    hey,

    does anyone know of a script i can use to rotate varius iframes?

    thanks
    Take it Easy !!!
  • Warlock77
    Confirmed User
    • Apr 2004
    • 246

    #2
    Try this

    Code:
    <script language="JavaScript">
    <!--
    var r_text = new Array ();
    r_text[0] = "IFRAMECODE1";
    r_text[1] = "IFRAMECODE2";
    r_text[2] = "IFRAMECODE3";
    r_text[3] = "IFRAMECODE4";
    r_text[4] = "IFRAMECODE5";
    r_text[5] = "IFRAMECODE6";
    r_text[6] = "IFRAMECODE7";
    var i = Math.floor(7*Math.random())
    
    document.write(r_text[i]);
    
    //-->
    </script>

    Comment

    • Spudman
      Confirmed User
      • Aug 2002
      • 3198

      #3
      hey warlock,

      that script doesn't work for me.

      anyone got any others?

      thanks
      Take it Easy !!!

      Comment

      • troncarver
        Confirmed User
        • Nov 2006
        • 1584

        #4
        Code:
        <script language="javascript"><!--
        ad=new Array(2);
        ad[0]='<a target=_blank href=""><img src="" / border="0"></a>';
        ad[1]='<a target=_blank href=""><img src="" / border="0"></a>';
        var ran_num=Math.floor(Math.random()*ad.length);
        document.write(ad[ran_num]);
        //--></script>
        BADOINK.COM
        skype: troncarver

        Comment

        • Spudman
          Confirmed User
          • Aug 2002
          • 3198

          #5
          Originally posted by troncarver
          Code:
          <script language="javascript"><!--
          ad=new Array(2);
          ad[0]='<a target=_blank href=""><img src="" / border="0"></a>';
          ad[1]='<a target=_blank href=""><img src="" / border="0"></a>';
          var ran_num=Math.floor(Math.random()*ad.length);
          document.write(ad[ran_num]);
          //--></script>
          isn't that just a banner rotation script? i dont think that will work

          I need to be able to rotate iframes so i can rotate dating and webcam iframes, any help appreciated.
          Take it Easy !!!

          Comment

          • dready
            Confirmed User
            • Oct 2002
            • 5247

            #6
            OpenX might be overkill, but it does a great job.
            ICQ: 91139591

            Comment

            • aico
              Moo Moo Cow
              • Mar 2004
              • 14748

              #7
              any random text script and a .shtml page should world. Good luck with the Cache though.

              Comment

              • Rorschach
                So Fucking Banned
                • Aug 2002
                • 5579

                #8
                Put your iframe code in various text files, eg. 1.html -> 6.html. Include the entire iframe code from opening iframe tag to the closing tag.

                Put this code where you want to place your rotating iframe:

                <?php

                $max = 6;

                $i = mt_rand(1, $max);

                include("$i.html");

                ?>

                You can change the value of $max depending on how many iframe text files you have.

                Comment

                • grumpy
                  Too lazy to set a custom title
                  • Jan 2002
                  • 9870

                  #9
                  Originally posted by aico
                  any random text script and a .shtml page should world. Good luck with the Cache though.
                  easy, nocache in the metatags
                  Don't let greediness blur your vision | You gotta let some shit slide
                  icq - 441-456-888

                  Comment

                  • Spudman
                    Confirmed User
                    • Aug 2002
                    • 3198

                    #10
                    Originally posted by Rorschach
                    Put your iframe code in various text files, eg. 1.html -> 6.html. Include the entire iframe code from opening iframe tag to the closing tag.

                    Put this code where you want to place your rotating iframe:

                    <?php

                    $max = 6;

                    $i = mt_rand(1, $max);

                    include("$i.html");

                    ?>

                    You can change the value of $max depending on how many iframe text files you have.
                    does this work in a .shtml page? can't get it to work.
                    Take it Easy !!!

                    Comment

                    • Rorschach
                      So Fucking Banned
                      • Aug 2002
                      • 5579

                      #11
                      It's php, you need to use it a .php page or enable php parsing in .html or .shtml pages via your .htaccess file.

                      Comment

                      • Spudman
                        Confirmed User
                        • Aug 2002
                        • 3198

                        #12
                        Originally posted by Rorschach
                        It's php, you need to use it a .php page or enable php parsing in .html or .shtml pages via your .htaccess file.
                        thanks,

                        8char
                        Take it Easy !!!

                        Comment

                        • Spudman
                          Confirmed User
                          • Aug 2002
                          • 3198

                          #13
                          bump for any more ideas/scripts, haven;t got any of the above to work.
                          Take it Easy !!!

                          Comment

                          • peeperpimp
                            Confirmed User
                            • Aug 2006
                            • 5105

                            #14
                            I'd like to see one of these codes mentioned above running live on a site, any url's ?
                            ICQ: 377517467
                            peeperpimp (at) yahoo (dot) com

                            Comment

                            • Spudman
                              Confirmed User
                              • Aug 2002
                              • 3198

                              #15
                              going to bump this for some help
                              Take it Easy !!!

                              Comment

                              • mikeyddddd
                                Viva la vulva!
                                • Mar 2003
                                • 16557

                                #16
                                Here's a page I just made that includes iframes from PussyCash and also has javascripts for different sponsor's peel ads.

                                Your htaccess should be set up to allow the file extension you use for the page to parse, for ex.

                                AddHandler server-parsed .htm
                                AddHandler server-parsed .html

                                The spudman page has this:

                                <!--#include virtual="/path to the rotate script/rotate-iframe.php" -->

                                The script has this:

                                <?php

                                $max = 7;

                                $i = mt_rand(0, $max);

                                include("iframe-$i.txt");

                                ?>

                                each of the text files (0-7) has something like this:

                                <script src="http://fb.cashtraffic.com/pa.php/freelifetimeamateurs/1.jpg/13318/40.js"></script>
                                <iframe src="http://pcash.imlive.com/releaseSE/activepage198.asp?WID=123475591185&linkID=1036&got opage=hostlist.asp&trdlvlcbid=1&promocode=BCODE8AF A78EC_00000&textcolor=FFFFFF&bgcolor=000033" scrolling="No" marginwidth=0 marginheight=0 align="MIDDLE" width="500" height="210" frameborder="No"></iframe>


                                In this example, the script and text files are in the same directory to simplify things.




                                Edit:
                                Refresh the page to see the ads change.
                                Last edited by mikeyddddd; 11-20-2008, 01:38 AM.

                                Comment

                                • mikeyddddd
                                  Viva la vulva!
                                  • Mar 2003
                                  • 16557

                                  #17
                                  The text files are named:

                                  iframe-0.txt
                                  iframe-1.txt
                                  iframe-2.txt
                                  iframe-3.txt
                                  iframe-4.txt
                                  iframe-5.txt
                                  iframe-6.txt
                                  iframe-7.txt

                                  Comment

                                  • fris
                                    Too lazy to set a custom title
                                    • Aug 2002
                                    • 55679

                                    #18
                                    if you are doing it on a wordpress blog, i have a solution that will work
                                    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                    Comment

                                    Working...