Hi,
I'm using a phpBB mod called ezPortal,well I made a block to add a random image by day,for example if it's monday i would like a script that could select the images for monday and display them randomly. A few months ago someone here helped me get a great random image script that has sessions :
Can anyone help me maybe modify this script a bit to display the images by the day?PHP Code:<?php
error_reporting(E_ALL);
session_start();
$image = array(
array(
'image' => 'images/image.jpg',
'link' => 'http://url.com'
),
array(
'image' => 'images/image.jpg',
'link' => 'http://url.com'
)
);
if(!isset($_SESSION['curing']))
$_SESSION['curing'] = rand(0, count($image) - 1);
$image = $image[$_SESSION['curing']];
$image = '<a href="' . $image['link'] . '" target="_top"><img src="' . $image['image'] . '" border="0"></a>';
?>
<html>
<head>
</head>
<body>
<?php echo($image); ?>
</body>
</html>
Thanks for your time
Regards
Mick



Reply With Quote
Bookmarks