<head>section of your page and sticking the following
<div>on the page where you want the ads to appear:<div class='stackad' data-site='stackoverflow.com'></div>
data-siteis the parent site of the Stack Exchange site whose ads you want to display.
Screenshot / Code Snippet
StackAd demo available here.
StackAd pulls the answers from this question that have 6 or more upvotes and displays a random ad in the box. The code is provided as a .js file you can embed in your pages. The instructions are here.
As is common with all of my open-source apps, I am going with the MIT license.
http://stackoverflow.quickmediasolutions.com/stackad/stackad.js <- This file can be hotlinked and has been minified to save bandwidth
http://stackoverflow.quickmediasolutions.com/stackad/stackad-source.js <- This is the source
http://stackoverflow.quickmediasolutions.com/stackad/test.html <- to see a demo
http://stackoverflow.quickmediasolutions.com/stackad/fancy.html <- to see an even better demo
I can be reached at [email protected]