Creating an embeddable widget for external websites?

Via http functions, you can return HTML code so the site that embed it can see its content.