<code>
<?php
$files = array();
foreach (glob("/home/example.org/public_html/rotate/*.jpg") as $file) { $files[] = basename($file); }
shuffle($files);
echo '<a href="http://example.org/rotate"><img style="display: block; opacity: 0.95;" src="rotate/'.array_pop($files).'" /></a>'."\n";
if ( count($files) > 20) { $t = array_slice($files,1,20); } else { $t = $files; }
foreach ($t as $file) { echo '<a href="http://example.org/rotate"><img src="rotate/'.$file.'" /></a>'."\n"; }
?>
</code>