PHP script (General Discussion)

PHP script // General Discussion

1  |  

swe

May 10, 2003, 8:26am
anyone know where a can find a php script which would rotate images, like in
banner rotation systems. so say i have 10 images, and have a sign which has
auto update of 600. i need a script which would change the image every 600
seconds :). i couldn't find it anywhere.

Thanx
-SWE

john

May 10, 2003, 12:11pm
I believe Pineriver gives a script out for this on his website :-)

[View Quote]

pineriver

May 10, 2003, 3:39pm
you want this for active worlds, or a webpage?
[View Quote]

tengel

May 10, 2003, 4:14pm
To me it sounds it is to AW, since he talk about sign with update.

Tengel

[View Quote]

swe

May 10, 2003, 4:36pm
ya, activeworlds :)

-SWE

[View Quote]

ananas

May 10, 2003, 6:04pm
<?PHP
define ("PICTURE_TIMER", 600); // MODIFY IF NEEDED

$aPics = array (
'pic1',
'pic2',
'pic3',
'pic4',
'pic5',
'pic6',
'pic7',
'pic8',
'pic9',
'pic10'
);

// . for current directory
$DocRoot = '.';


$i = (time()/PICTURE_TIMER) % sizeof($aPics);
$Basename = $aPics[$i].'.jpg';
$Filename = $DocRoot.'/'.$Basename;

Header ('Content-type: image/jpeg');
Header( 'Content-Disposition: attachment; filename='.$Basename );
readfile ($Filename);
?>


[View Quote]

swe

May 10, 2003, 6:11pm
thanx alot :)

-SWE

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn