View Single Post
Old 04-14-2007, 07:36 PM  
spasmo
Confirmed User
 
Join Date: Dec 2005
Location: Couch
Posts: 2,678
We wrote this, but it really doesn't scale well up to hundreds of links (would work, but a pain in the ass).

Code:
<?
switch($HomePageHits&#37;3) {
        case 0:
print <<<ENDBANNER
<a href="http://firstlinkhere.com" target="_blank">Link 1</a>
ENDBANNER;
                break;
        case 1:
print <<<ENDBANNER
<a href="http://secondlinkhere.com" target="_blank">Link 2</a>
ENDBANNER;
                break;
        case 2:
print <<<ENDBANNER
<a href="http://thirdlinkhere.com" target="_blank">Link 3</a>
ENDBANNER;
                break;
}
?>
If you decide to use it, let me know if you have any questions about how it works.

Edit: $HomePageHits needs to be an incrementing number. In our case we use the counter for home page hits from our db.
__________________

Surfers: Go here for hot babes.

Last edited by spasmo; 04-14-2007 at 07:39 PM..
spasmo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote