Hier mal der Code:
Code:
<?php function random( $max ) { $x = rand(); $y = getrandmax(); $r = $x / $y * ($max -1 ); $r = round( $r++ ); return $r; } $i = 0; $d = dir("."); while($entry=$d->read()) if (substr($entry,0,6) == "banner") $array[$i++] = $entry; $d->close(); $r = random( $i ); Header( "Pragma: no-cache" ); Header( "Expires: Monday 01-Jan-80 12:00:00 GMT" ); Header( "Content-type: image/gif"); passthru( "cat $array[$r]" ); ?>
Code:
<img src="http://www.yourserver.com/bannerdir/banner.phtml"
Würde mich über Hilfe sehr freuen, danke schonmal im Voraus.
Einen Kommentar schreiben: