Referral Link Rotation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • propromotions
    Confirmed User
    • Nov 2002
    • 260

    #1

    Referral Link Rotation

    Does anybody know of a script that will rotate links? For example, user 1 clicks on a link and takes them to tour A. user 2 clicks the link and takes them to tour B.

    Thanks for any and all help.
  • wallst
    Confirmed User
    • Aug 2004
    • 1621

    #2
    wish i could help - i could use a good banner rotator myself.
    Earl Miller Cash
    20th Congress

    Comment

    • propromotions
      Confirmed User
      • Nov 2002
      • 260

      #3
      its gotta be sorta like a banner rotater i guess. the only different is your clicking text and not image.

      Comment

      • kernelpanic
        Too lazy to set a custom title
        • Jan 2005
        • 2961

        #4
        Just find one of the endless free ad rotators and modify it to output text links instead of IMG tags


        ZangoCash - Turn Your Traffic Into Ca$h.
        $.40 Per Install - No Tier

        Comment

        • SmokeyTheBear
          ►SouthOfHeaven
          • Jun 2004
          • 28609

          #5
          Originally posted by wallst
          wish i could help - i could use a good banner rotator myself.
          view-source gfy's isnt exactly custom..
          hatisblack at yahoo.com

          Comment

          • Alex
            So Fucking Banned (YEA!!)
            • Jun 2004
            • 10963

            #6
            Do you need it to rotate text links? Or just the actually URL?

            If its the actually URL a simple php OUT script can be coded
            Care about me?
            Who?
            Me!
            Who?

            Comment

            • SmokeyTheBear
              ►SouthOfHeaven
              • Jun 2004
              • 28609

              #7
              heres a simple text or image banner rotation
              Code:
              <!----Main Banner Rotation--------
              
              var myWidth = 0, myHeight = 0;
                if( typeof( window.innerWidth ) hahahaha 'number' ) {
                  //Non-IE
                  myWidth = window.innerWidth;
                  myHeight = window.innerHeight;
                } else {
                  if( document.documentElement &&
                      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
                    //IE 6+ in 'standards compliant mode'
                    myWidth = document.documentElement.clientWidth;
                    myHeight = document.documentElement.clientHeight;
                  } else {
                    if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                      //IE 4 compatible
                      myWidth = document.body.clientWidth;
                      myHeight = document.body.clientHeight;
                    }
                  }
                }
              
              var winl = (myWidth - 624) / 2;
              var wint = (myHeight - 600) / 2;
              
              n=new Date();																					
              //j=n.getSeconds();
              m=n.getMilliseconds();
              t=n.getSeconds();
              b=m*.001;
              j=t+b;
              
              if      (j<20.3) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
              else if (j<40.1) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
              else if (j<59.9) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
              
              else           document.write("<center><a href=\"http://www.defaultlink.com\" target=\"_blank\"><img src=\"http://yoursite.com/big.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
              //----Banner Rotation-----End Hide from inferior browsers----->
              hatisblack at yahoo.com

              Comment

              • propromotions
                Confirmed User
                • Nov 2002
                • 260

                #8
                Originally posted by SmokeyTheBear
                heres a simple text or image banner rotation
                Code:
                <!----Main Banner Rotation--------
                
                var myWidth = 0, myHeight = 0;
                  if( typeof( window.innerWidth ) hahahaha 'number' ) {
                    //Non-IE
                    myWidth = window.innerWidth;
                    myHeight = window.innerHeight;
                  } else {
                    if( document.documentElement &&
                        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
                      //IE 6+ in 'standards compliant mode'
                      myWidth = document.documentElement.clientWidth;
                      myHeight = document.documentElement.clientHeight;
                    } else {
                      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                        //IE 4 compatible
                        myWidth = document.body.clientWidth;
                        myHeight = document.body.clientHeight;
                      }
                    }
                  }
                
                var winl = (myWidth - 624) / 2;
                var wint = (myHeight - 600) / 2;
                
                n=new Date();																					
                //j=n.getSeconds();
                m=n.getMilliseconds();
                t=n.getSeconds();
                b=m*.001;
                j=t+b;
                
                if      (j<20.3) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
                else if (j<40.1) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
                else if (j<59.9) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
                
                else           document.write("<center><a href=\"http://www.defaultlink.com\" target=\"_blank\"><img src=\"http://yoursite.com/big.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n");
                //----Banner Rotation-----End Hide from inferior browsers----->
                Thanks a bunch for your help!

                Comment

                • SmokeyTheBear
                  ►SouthOfHeaven
                  • Jun 2004
                  • 28609

                  #9
                  the only part gfy screws up is one hahahaha..

                  just look in the code i posted above and find the hahahah it should be 2 equal signs next to each other like = = but right next to each other
                  hatisblack at yahoo.com

                  Comment

                  • SmokeyTheBear
                    ►SouthOfHeaven
                    • Jun 2004
                    • 28609

                    #10
                    wait im not finished , copy all that code into a text document and save it as banner.js

                    then to use it all you have to do is call the js file like this

                    <script language="javascript" src="http://yoursite.com/banners.js"></script>
                    hatisblack at yahoo.com

                    Comment

                    • SmokeyTheBear
                      ►SouthOfHeaven
                      • Jun 2004
                      • 28609

                      #11
                      ok now to explain th script a bit it basically works like a timer.. on a 60 second clock..

                      It uses document write to make the banners ( you can use just text links or images or flash or whatever you want really. )

                      In the example it only rotates between 3 links , but if you wanted to add more you simply make another line and edit the seconds.

                      Basically it gets the seconds of your time and if TIME is under 20 seconds it displays the first banner , if the time is over 20 but under 40 it displays the second banner , etc etc etc. So if you want to add another banner you need to edit the times of the other banners to.. You could also use this to run one banner 60% more than another by simply editing the gap of time it will be displayed on.. if your totally not understanding what i'm saying then.. drop your icq i'll explain it a bit better
                      hatisblack at yahoo.com

                      Comment

                      • viki
                        Confirmed User
                        • Jan 2005
                        • 2640

                        #12
                        Here's a PHP solution that I use:

                        Put this in a separate file, add as many links as you'd like... and of course remember to escape all quotation marks within the link with a \.

                        PHP Code:
                        <? 
                        $bannerCounter= 1; 
                        
                        $bannerCode[$bannerCounter] = "<a href=\"http://www.yoursite.com\">text link or image here</a>"; 
                        $bannerCounter++;
                        
                        $bannerCode[$bannerCounter] = "<a href=\"http://www.yoursite.com\">text link or image here</a>"; 
                        $bannerCounter++;
                        
                        $bannerCode[$bannerCounter] = "<a href=\"http://www.yoursite.com\">text link or image here</a>"; 
                        $bannerCounter++;
                        
                        
                        
                        $bannerAdTotals = $bannerCounter - 1; 
                        if($bannerAdTotals>1) 
                        {
                           mt_srand((double)microtime() * 1234567); 
                           $bannerPicked = mt_rand(1, $bannerAdTotals); 
                        }
                        else
                        {
                           $bannerPicked = 1; 
                        }
                        $bannerAd = $bannerCode[$bannerPicked]; 
                        ?>

                        And then put this code where you want to see the rotation. Where it says "links.php" , rename that to whatever you named the previous file.

                        PHP Code:
                        <? 
                        include_once("links.php"); 
                        echo "<div align='center'>$bannerAd</div>";
                        ?>

                        viki [at] realsexcash [dot] com
                        228 263 454

                        Comment

                        • viki
                          Confirmed User
                          • Jan 2005
                          • 2640

                          #13
                          Where it says "hahaha91" it should be a left bracket.

                          viki [at] realsexcash [dot] com
                          228 263 454

                          Comment

                          • BillyHoe
                            Confirmed User
                            • Mar 2003
                            • 2214

                            #14
                            Originally posted by propromotions
                            Thanks a bunch for your help!
                            thanks

                            True Amateur Sites!!



                            ICQ:124399549

                            Comment

                            • Dusen
                              Confirmed User
                              • Aug 2002
                              • 2251

                              #15
                              As an alternative to Smokey's Time based one (Which is a hot idea btw) I would suggest reading/writing out via PHP to a file an integer with what was last shown

                              so set up an array 0,1,2,3 with the addresses to rotate

                              echo "0" > file.txt

                              the script:
                              ---------

                              read number from file,

                              if ($readnum!=count($array)-1) { $current=$readnumber+1; }
                              else { $current=0; }

                              echo $array[$current]
                              write $current to file

                              However this breaks down under heavy traffic performance wise but ensures even distribution. I didn't include all code cause I'm eating lunch.
                              Penis Pill Sponsor List and Reviews:
                              http://www.pillsponsors.com

                              Comment

                              Working...