$ratelimit ) { touch ( $ansible_dropfile ); touch ( $ansible_lastrun ); echo "HTTP 200 - Ansible webhook recieved."; } else { http_response_code(429); echo "HTTP 429 - Rate Limited."; exit(0); } } elseif ($data["repository"]["full_name"] == 'thunix/www') { syslog(LOG_INFO, 'WWW Webhook recieved.'); if ( time () - filemtime ( $www_lastrun ) > $ratelimit ) { touch ( $www_dropfile ); touch ( $www_lastrun ); http_response_code(200); echo "HTTP 200 - WWW webhook recieved."; } else { http_response_code(429); echo "HTTP 429 - Rate Limited."; exit(0); } } else { http_response_code(418); echo "HTTP 418 - I'm a teapot."; exit(0); } ?>