![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
How can I show different html based on time of day? perhaps php code?
I need to embed a flash file from 8-midnight CST (server time), and a different bit of html at all other times.
Like Code:
From 8-midnight embed this movie then all other times use this html. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: May 2007
Location: So fucking gone
Posts: 1,839
|
Quote:
__________________
Trafficadept | Best traffic I have ever tested | web "@t" cuul.org |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
thanks Big D
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Join Date: Oct 2003
Location: In a house.
Posts: 9,465
|
Juicy likes pie... and apache!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
<? if (date('G') >= 8 && date('G') >= 12) { ?>
Alternate code <? } else { ?> Other code <? } ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
Damn - I tried the mod rewrite Juicy sent me. It worked fine at first, but it didn't switch it back at the appropriate hour.
Quote:
So I tried tat one, and it doesn't seem to be working either. Anyone can help me with this? 169334379 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
RIP Dodger. BEST.CAT.EVER
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
|
I think someone hacked his nick.
__________________
-uno icq: 111-914 CrazyBabe.com - porn art MojoHost - For all your hosting needs, present and future. Tell them I sent ya! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
You need to set it to run at whatever your server time is, offset from yours. So if the server thinks it's 10, and you think it's 8, you set it for 10. If it didn't work at all, php short tags are off, replace the <? part with <?php and it should work.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Apr 2007
Location: Montreal, Canada
Posts: 254
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Quote:
Sure it does. If you need assitance, you can ICQ me for my hourly rate. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
i just sent you an ICQ.
Hopefully your hourly rate is pro-rateable, since this should take you a couple seconds to fix :D |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
I suck at programming, so if you try the following, you might be insane.
Code:
<?PHP // default to all hours $flash = "<object....><embed....></embed></object>"; // test time frame if( date("H") >= 20 && date("H") != 0 ) { $flash = "<object...>new shit<embed...>new shit</embed></object>"; } ?> Code:
<html> <body> <?PHP echo($flash); ?> </body> </html>
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
I do suck at programming... maybe the PHP "if" statement could have simply been:
if( date("H") >= 20 ) // 'H' { .. blah blah } anyway... back to nonsense. Quote:
__________________
Your post count means nothing. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
somebody ICQ me please - 169334379
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
bargitty barg barg barg
COME ON!!!!!! *New drink :D |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Hi Wolfy,
Sorry I missed you - I was having dinner and my volume was set too low to notice. Feel free to hit me up. ICQ is in the sig.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
thank you GA and psili, you guys rock!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
Grouchy's attentive, for a grouchy guy ;)
He doesn't misplace or forget the special characters.
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | ||
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Quote:
Code:
if (date("G") >= "20" || (date("G") == "0" && date("i") == "00")) { Quote:
![]()
__________________
|
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
I totally see what you mean. When I was sadly trying to help Wolfy, after looking at his .txt file, I gave him:
if (date("G") >= "20" { which made his PHP puke -- I missed the right parens. Oh well... that's why there's "programmers" and "script kiddies" (I'll be the latter) to help all others get confused, I guess. Quote:
__________________
Your post count means nothing. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |