BTW, the code you have now is not time-based, and does not rotate the galleries in the "database". The time thing in it is only to seed the "random" function. Right now a random gallery is chosen from the file every time the script is called, there is no "refresh" or "rotation".
__________________
/(bb|[^b]{2})/
|