Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-16-2005, 09:21 AM   #1
propromotions
Confirmed User
 
Join Date: Nov 2002
Posts: 260
:mad 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.
propromotions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:22 AM   #2
wallst
Confirmed User
 
Join Date: Aug 2004
Location: South East
Posts: 1,621
wish i could help - i could use a good banner rotator myself.
__________________
Earl Miller Cash
20th Congress
wallst is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:27 AM   #3
propromotions
Confirmed User
 
Join Date: Nov 2002
Posts: 260
its gotta be sorta like a banner rotater i guess. the only different is your clicking text and not image.
propromotions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:28 AM   #4
kernelpanic
Too lazy to set a custom title
 
Join Date: Jan 2005
Posts: 2,961
Just find one of the endless free ad rotators and modify it to output text links instead of IMG tags
kernelpanic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:30 AM   #5
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
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
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:32 AM   #6
Alex
So Fucking Banned (YEA!!)
 
Join Date: Jun 2004
Posts: 10,963
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?
Alex is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:38 AM   #7
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
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
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:40 AM   #8
propromotions
Confirmed User
 
Join Date: Nov 2002
Posts: 260
Quote:
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!
propromotions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:40 AM   #9
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
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
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:41 AM   #10
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
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
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:45 AM   #11
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
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
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:48 AM   #12
viki
Confirmed User
 
viki's Avatar
 
Join Date: Jan 2005
Posts: 2,640
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
viki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:50 AM   #13
viki
Confirmed User
 
viki's Avatar
 
Join Date: Jan 2005
Posts: 2,640
Where it says "hahaha91" it should be a left bracket.
__________________

viki [at] realsexcash [dot] com
228 263 454
viki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:51 AM   #14
BillyHoe
Confirmed User
 
BillyHoe's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: Vaudreuil/Montreal
Posts: 2,214
Quote:
Originally Posted by propromotions
Thanks a bunch for your help!
thanks
__________________

True Amateur Sites!!



ICQ:124399549
BillyHoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-16-2005, 09:56 AM   #15
Dusen
Confirmed User
 
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
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
Dusen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.