![]() |
iframe rotator script?
hey,
does anyone know of a script i can use to rotate varius iframes? thanks :) |
Try this
Code:
<script language="JavaScript"> |
hey warlock,
that script doesn't work for me. anyone got any others? thanks |
Code:
|
Quote:
I need to be able to rotate iframes so i can rotate dating and webcam iframes, any help appreciated. |
OpenX might be overkill, but it does a great job.
|
any random text script and a .shtml page should world. Good luck with the Cache though.
|
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. |
Quote:
|
Quote:
|
It's php, you need to use it a .php page or enable php parsing in .html or .shtml pages via your .htaccess file.
|
Quote:
8char |
bump for any more ideas/scripts, haven;t got any of the above to work.
|
I'd like to see one of these codes mentioned above running live on a site, any url's ?
|
going to bump this for some help :)
|
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. |
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 |
if you are doing it on a wordpress blog, i have a solution that will work
|
All times are GMT -7. The time now is 04:33 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123