Script That Rotates iFramed Pages

Geshwinn

Power Member
Joined
Aug 12, 2009
Messages
625
Reaction score
119
Hi guys,

Can you help me out with a simple script that rotates iframes every time the website reloads?
 
It it should change only when the whole page reloads, then you can do it in PHP.
Make an array of links to rotate and display random.
But you can surely do the same in JS, but it seems more legit in PHP.
If you want the code, i can write it in both PHP and JS. Just choose.
 
I would very much appreciate this.

What do you mean by 'seems more legit'?
 
If you would code it in PHP, then noone could determine what you are doing just by viewing source code.

Code:
$aLinks = array(
'htt*://domain1*com/link',
'htt*://domain2*com/link',
'htt*://domain3*com/link',
'htt*://domain4*com/link',
'htt*://domain5*com/link',
'htt*://domain6*com/link',
);
echo '<iframe src="'.$aLinks[rand(0, count($aLinks)-1)].'" height="200" width="200"></iframe>';

i cant post URLs but you surely understand where they are ;-)
 
Back
Top