Random image on new site setup

I'm trying to create new sites on my mu setup that can display and set a random background image once only on the site creation. The only resource i know of is setting a random image using some php, but this sets the same sequence of images for every site.
Anyone know how to do this?