Jump to content


Photo

random banners.


  • Please log in to reply
4 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 June 2006 - 03:17 AM


I am curently learning how to get random images from an array i done that

but is there a way to get the image to change every hour with time() .





<?php

$banner[]="<img src='name.gif'></img>";
$banner[]="<img src='name.gif'></img>";
$banner[]="<img src='name.gif'></img>";

srand( (double) microtime() * 10000000);

$banners= array_rand($banner);

echo "<html><body bgcolor='blue'><br>$banner[$banners]<br></body></html>";


?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 phpstuck

phpstuck
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 27 June 2006 - 04:06 AM

Here is a script that does just that using a cookie. It is easier for me to link you than try to explain it.

[a href=\"http://www.clarksco.com/blog/?p=10\" target=\"_blank\"]http://www.clarksco.com/blog/?p=10[/a]

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 June 2006 - 04:18 AM

[!--quoteo(post=388349:date=Jun 27 2006, 04:06 AM:name=phpstuck)--][div class=\'quotetop\']QUOTE(phpstuck @ Jun 27 2006, 04:06 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Here is a script that does just that using a cookie. It is easier for me to link you than try to explain it.

[a href=\"http://www.clarksco.com/blog/?p=10\" target=\"_blank\"]http://www.clarksco.com/blog/?p=10[/a]
[/quote]

thank you but a tutoral would be better to learn but thanks.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 June 2006 - 05:26 AM

how do you do this please cheers


if($time_know){

echo image

}else{

if ($time_know+5 mins){

echo diffrent image

on

on

on


So a picture will show diffrent according to the time diffrence can not work it out
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 27 June 2006 - 12:12 PM

[!--quoteo(post=388373:date=Jun 27 2006, 01:26 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 27 2006, 01:26 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
how do you do this please cheers ... So a picture will show diffrent according to the time diffrence can not work it out
[/quote]
Even with your pseudo-code example, I can't begin to understand what you want to do. Can you explain (in words) in more detail how you want this to work. Are you interested in the time or the time since something happened?

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users