参考文档:
http://ibillxia.github.io/blog/2010/08/10/php-connecting-tool-snoopy-introduction-and-application/