The SitePoint PHP blog has a recent tutorial showing you how you can use one of three different ways to embed badges into your site. These "badges" are a common practice among sites allowing other sites/applications to embed small statistics such as number of Tweets or Likes about a page.
One great way of organically promoting your application is to provide “badges”; snippets of content that people can embed on their own websites. [...] This can contain up-to-the-minute information from your application about a user, piece of content or another object, dynamically generated and inserted into other websites. In this article I’m going to take a look at some of the ways you can implement this.