Gitlab Webhook in PHP

I started using Gitlab a while ago, and wanted to use the Webhook feature to automatically update the website I was working on when the master branch was updated.

I looked for an easy solution on the internet, but didn’t find anything that worked out of the box. Finally I came up with this code, that worked for me.


Debian VPS

A Virtual private server (VPS) is a server that does not directly exist as a single computer, but is emulated on a computer together with other virtual servers. This means that they are usually cheaper because they share the resources with other servers. The good thing about this is that you (the admin) have (almost) complete access to the server. You can install whatever OS you like and have complete root access, which enables you to change almost everything. In contrast to a hosting arrangement, where you only can host websites.

The reason why I am renting one is so I can play around with it :) It is wonderful fun. During the last couple of months I have set up multiple services on it, which I briefly describe now: