I've tried that php method to randomize our banner's backgrounds but I ran into issues with the images caching and then not changing without a hard refreshs.
Not sure if that's because we use a CDN but this simple script is what I ended up using;
http://www.landthieves.com/board/forum.php
Code:
<script type="text/javascript">
var images = ['xxx.jpg', 'xxx.jpg', 'xxx.jpg'];
$('#splash').css(
{'background': 'url(http://www.website.com/images/bkg/random/' + images[Math.floor(Math.random() * images.length)] + ')no-repeat scroll top / 100%'});</script>
filenames
css element
url to directory