https://gist.github.com/robinsmidsrod/2234639

there is a Dban example in there.