Skip to content

Instantly share code, notes, and snippets.

@benallfree
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benallfree/acd0f93faeea0af0b972 to your computer and use it in GitHub Desktop.
Save benallfree/acd0f93faeea0af0b972 to your computer and use it in GitHub Desktop.
github PHP webhook responder
<?php
if(!$_GET['pw']=='hFGw6DSxIFo8n7c4mb0RRCAdxAsK1jTDyZPyb6xlxqXKq6tM2') die('ok');
$data = json_decode($HTTP_RAW_POST_DATA,true);
chdir(dirname(__DIR__));
exec('bash update.sh', $output, $return);
die(join("\n",$output));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment