This is a sample PHP script to auto deploy PHP script using GitHub and Bitbucket hook function.
In master branch, I've added the sample code for your production public server to do more secure deployment.
In dev-server branch, I've added the simple lazy less secure way.
Please read the comments of each deployments.php for the option.
http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/ http://jonathannicol.com/blog/2013/11/19/automated-git-deployments-from-bitbucket/
If you're Japanese, I've added the Japanese instructions in my blog
日本語での設定方法はこちらから http://ja.katzueno.com/2015/01/3390/