· 9 years ago · Feb 04, 2017, 03:52 AM
1<?php
2 $SECRET_KEY = '';
3 $header = getallheaders();
4 $hmac = hash_hmac('sha1', file_get_contents('php://input'), $SECRET_KEY);
5
6 if ( isset($header['X-Hub-Signature']) && $header['X-Hub-Signature'] === 'sha1='.$hmac ) {
7 $payload = json_decode( file_get_contents('php://input'));
8 shell_exec( 'cd /home4/pbshawa1/public_html/wordpress && git reset --hard HEAD && git pull' );
9 }
10
11?>
12<h1>Aloha!</h1>