I know this topic is old, but it is still a sticky... the first link under code examples is outdated. it does not exist anymore.