On Sunday 04 December 2005 10:02, Jérôme Gagnon-Voyer wrote:
> And I supose you will write some PHP code and send it to Lee after? :P
>
The following should do it:
<?php
$dir="logos";
$files=array();
$dh=opendir($dir);
while($file=readdir($dh)) {
$file=$dir.'/'.$file;
if(is_file($file)) {
$files[]=$file;
}
}
$img=rand(0,count($files)-1);
echo '<img src="'.$files[$img].'" />';
?>or even more simply: <?php $next=rand(1,8); echo '<img src="logos/'.$next.'png">'; ?> > Better to have one logo anyway > Hard to choose :P > Le 05-12-04 à 12:54, Karol Krizka a écrit : > > On Sunday 04 December 2005 09:51, Boris Faure (billiob) wrote: > >> You should write some php in order to choose randomly what logo to > >> display > > > > That would be really cool, go with that. > > > > -- > > Karol Krizka > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=Click > _______________________________________________ > Amsn-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/amsn-devel -- Karol Krizka
pgpnk6xswxTJW.pgp
Description: PGP signature
