Here’s a script you can use to rotate images in a directory.
To use it, just do something like
background: url(/path/to/script/rotator.php) top left no-repeat;
I believe the script expects the images to be in the same directory as itself, but you can change that.