Note that this is just a quick and dirty implementation which can serve as a base for your own projects. Please DO NOT use this in any production environment. I have published a detailed article on ...