Just code the HTML for the banners as supplied by your banner site.

Where you want the same random number to be substituted, code UBBRandomX

When placed in the control panel header or footer fields, that string will be changed to a random value (the same for all occurences of UBBRandomX).

Another way that I now prefer to use is to code some Javascript to generate the banner HTML including a random value.