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 Mark Forums Read
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 10-01-2003, 02:47 PM   #1
Hardcore J
Hardcore 4 Life™
 
Hardcore J's Avatar
 
Join Date: Mar 2003
Location: Everett, WA
Posts: 2,553
PHP pros, need help with something simple..

I have a script I had written for my paysites, it rotates a different html page every day, 5 different pages rotate total.

Here is the code, how would I need to tweek this in order to make it rotate 9 different pages total instead of 5?

Thanks in advance!

< ? php $day = date("z");
if($day >4)
{
while($day > 4)
{
$day = ($day - 4); }
}
include("0$day.html");
?>
Hardcore J is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 02:50 PM   #2
JSA Matt
So Fucking Banned
 
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
Uhm.. change all the 4's to 8's
JSA Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 02:51 PM   #3
Hardcore J
Hardcore 4 Life™
 
Hardcore J's Avatar
 
Join Date: Mar 2003
Location: Everett, WA
Posts: 2,553
Quote:
Originally posted by JSA Matt
Uhm.. change all the 4's to 8's
Wouldn't that make it rotate 10 instead of 9 ?
Hardcore J is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 02:58 PM   #4
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Quote:
Originally posted by Hardcore J


Wouldn't that make it rotate 10 instead of 9 ?
No, you'd have 0-8 as your result, nine numbers. Also, you can remove the enclosing "if" statement, it doesn't do anything that the "while" isn't taking care of.
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 03:00 PM   #5
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
Quote:
Originally posted by fiveyes

No, you'd have 0-8 as your result, nine numbers. Also, you can remove the enclosing "if" statement, it doesn't do anything that the "while" isn't taking care of.
Finally another person that starts counting at 0. Nobody believes me when I say I have to start counting at 0. Your cool! hehe

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 03:02 PM   #6
JSA Matt
So Fucking Banned
 
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
Quote:
Originally posted by Hardcore J


Wouldn't that make it rotate 10 instead of 9 ?
Actually since it doesn't count zero.. change all the 4's to 9's.

Results from my test:

Day: 269, 08.html
Day: 270, 09.html
Day: 271, 01.html

PHP Code:
    if ($day 9)    {
        while(
$day 9)    {
            
$day = ($day 9);
        }
    } 
JSA Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 04:58 PM   #7
kevinale
Confirmed User
 
Join Date: Dec 2002
Location: Austin, TX
Posts: 2,115
Quote:
Originally posted by Hardcore J
I have a script I had written for my paysites, it rotates a different html page every day, 5 different pages rotate total.

Here is the code, how would I need to tweek this in order to make it rotate 9 different pages total instead of 5?

Thanks in advance!

< ? php $day = date("z");
if($day >4)
{
while($day > 4)
{
$day = ($day - 4); }
}
include("0$day.html");
?>
The most elegant way is to do this:

<pre>
< ? php
$NUMPAGES = 9;
$day = date("z") % $NUMPAGES;
include("0$day.html");
?>
</pre>
__________________
1monkey0cup.com
kevinale is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 05:03 PM   #8
4Pics
Confirmed User
 
Industry Role:
Join Date: Dec 2001
Posts: 7,952
Quote:
Originally posted by kevinale


The most elegant way is to do this:

<pre>
< ? php
$NUMPAGES = 9;
$day = date("z") % $NUMPAGES;
include("0$day.html");
?>
</pre>
Nice...
4Pics is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 05:04 PM   #9
calm
Confirmed User
 
Join Date: Aug 2003
Location: Boston
Posts: 1,191
Quote:
Originally posted by kevinale


The most elegant way is to do this:

<pre>
< ? php
$NUMPAGES = 9;
$day = date("z") % $NUMPAGES;
include("0$day.html");
?>
</pre>
__________________
<a href="http://www.pimproll.com/"><img src=http://www.pimproll.com/banners/pimproll_468x60_02-3.gif border=0><br>bling bling</a><br><a href="http://www.exitking.com/?ID=40" target=_blank>$3.00 CPM -- NO SHAVING -- NO CONVERSIONS -- ALL YOUR HITS COUNTED</a><br>sign up under <a href="mailto:[email protected]">me</a> and <a href="mailto:[email protected]">I'll</a> send you 10k hits.
calm is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-01-2003, 10:49 PM   #10
Hardcore J
Hardcore 4 Life™
 
Hardcore J's Avatar
 
Join Date: Mar 2003
Location: Everett, WA
Posts: 2,553
Quote:
Originally posted by kevinale


The most elegant way is to do this:

<pre>
< ? php
$NUMPAGES = 9;
$day = date("z") % $NUMPAGES;
include("0$day.html");
?>
</pre>
Wow, thats quite a bit easier, huh?

Thanks!

Last edited by Hardcore J; 10-01-2003 at 10:56 PM..
Hardcore J is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2003, 09:15 AM   #11
adultwebware
Confirmed User
 
Join Date: Nov 2002
Location: Germany
Posts: 563
AdultWebware v3.5 can rotate whatever you want for you.
I.e. make daily updates without spending a minute.



I am always available for conversations of any kind here:

Email: [email protected]
MSN: [email protected]
ICQ: 166487010
__________________

THE EXPERIENCED paysite automation.
Simple. Powerful. Efficient. 5 years ripe.
adultwebware is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2003, 09:21 AM   #12
Evil1
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 3,893
Quote:
Originally posted by adultwebware
AdultWebware v3.5 can rotate whatever you want for you.
I.e. make daily updates without spending a minute.



I am always available for conversations of any kind here:

Email: [email protected]
MSN: [email protected]
ICQ: 166487010
That spam would have been better if you went ahead and did it before he had a solution.. what is it with you people?
__________________
Evil1 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-02-2003, 09:31 AM   #13
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
Originally posted by Evil1


That spam would have been better if you went ahead and did it before he had a solution.. what is it with you people?
That shit's getting old in a hurry, huh?
__________________
I like pie.
Babaganoosh 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
Thread Tools



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.