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 05-09-2007, 10:20 AM   #1
gleem
Confirmed User
 
gleem's Avatar
 
Industry Role:
Join Date: Jun 2001
Location: Sunny Land
Posts: 5,593
best very simple php banner rotator?

I need a very simple banner rotator to rotate some Iframe banners.. something that has almost load on the server, prefer something php non database run, flat file would be great, no stats needed..

anyone know of any?

phpads is what I use now, but it's such a fucking resource hog I can't use it anymore.
__________________




Contact me: \\// E: webmaster /at/ unprofessional.com
gleem is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-09-2007, 11:00 AM   #2
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
ad.php:

<?php
$ads = file('ads.txt');
echo $ads[array_rand($ads)];
?>

ads.txt would contain your iframe / banner html. One entry per line, no blank lines.

ie:

<iframe src="http://www.domain.com/iframe_1.html"...></iframe>
<iframe src="http://www.domain.com/iframe_2.html"...></iframe>

etc.

Then just include it <?php include("ad.php"); ?> where you want it.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-09-2007, 11:07 AM   #3
gleem
Confirmed User
 
gleem's Avatar
 
Industry Role:
Join Date: Jun 2001
Location: Sunny Land
Posts: 5,593
Quote:
Originally Posted by Lycanthrope View Post
ad.php:

<?php
$ads = file('ads.txt');
echo $ads[array_rand($ads)];
?>

ads.txt would contain your iframe / banner html. One entry per line, no blank lines.

ie:

<iframe src="http://www.domain.com/iframe_1.html"...></iframe>
<iframe src="http://www.domain.com/iframe_2.html"...></iframe>

etc.

Then just include it <?php include("ad.php"); ?> where you want it.
ahh, sweet, it's that simple huh?

How often would it show each banner? An equal amount of times? Is there a simple way to assign % show weights to each?
__________________




Contact me: \\// E: webmaster /at/ unprofessional.com
gleem is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-09-2007, 11:15 AM   #4
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
That would just be completely random, no weighting. I'm not much of a programmer. Ok, I suck... but if you place an ad twice in your list, it would theoretically be twice as likely to be displayed :P
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-09-2007, 11:42 AM   #5
gleem
Confirmed User
 
gleem's Avatar
 
Industry Role:
Join Date: Jun 2001
Location: Sunny Land
Posts: 5,593
Quote:
Originally Posted by Lycanthrope View Post
That would just be completely random, no weighting. I'm not much of a programmer. Ok, I suck... but if you place an ad twice in your list, it would theoretically be twice as likely to be displayed :P

Actually turns out the way the idiots that created my CMS did it, it won't parse a php include... guess I'm gonna have to try javascript instead..

I'll try your deal on my Wordpress site, shoudl work
__________________




Contact me: \\// E: webmaster /at/ unprofessional.com
gleem is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-09-2007, 12:40 PM   #6
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
try this
<?
$array = array("http://www.domain.com/iframe_1.html","http://www.domain.com/iframe_2.html");
shuffle($array);
echo "<iframe src='$array[0]'></iframe>";
?>
k0nr4d 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.