I THINK:
/* PHP CODE HERE, IF NECESSARY */
include_once("AdRotation.php");
/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
<div align="center">$bannerAd</div>
EOF;
/* DO NOT CHANGE THE LINE ABOVE */
If you store the php file outside of the cache_builders/custom folder you'd need to just link to its path on the server in the include statement, ex:
/home/yoursite/public_html/forums/AdRotation.php