Well i'm still not clear on exactly what you want to do...
You say banner, yet i'm not sure if you mean the whole header image or just an ad banner that is shown in the header.
Based on the CSS above i'd guess you want to change the 'header' background...
If you get stuck this is a very basic example, but one you can use pretty easily...
$randomvar = rand(1,5); // Random var becomes a random number from 1 to 5
Then in your header area...
<div class="header" id="myr<?php echo $randomvar; ?>">
Then in your CSS...
Where ### is the value you want... (you'll need to change it)
That just sorts out the attributes you want to use for the header...
So now you set the image with the unique ID...
and so on... up until #myr5 ....
PHP is so flexible you could do it any number of ways, that's just one..