A
A
Abror Jakey2017-03-26 16:28:41
PHP
Abror Jakey, 2017-03-26 16:28:41

How to properly catch data from Github webhook?

Hello everybody.
Has anyone encountered a problem with the github webhook?
In general, in the settings I specified a link where the information should be sent. Github accesses the link specified in the settings, but I can’t get the data in any way.
Tried to get the arrays $_POST, $_REQUEST, and checked the input streams, but to no avail.
If anyone has experience in this, please indicate where to dig.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Abror Jakey, 2017-03-26
@ayyjay

In general, it turned out that it was all my mistake, I caught the data like this " ", and it didn’t work because I then overwrote another code, so thanks for the answer. file_get_contents('php://input')

I
Ivan, 2017-03-26
@LiguidCool

As far as I remember, it's not like that.
Github kicks some script on the server. The script simply runs git pull. Nothing gets into the call itself, the maximum that can be passed is parameters or a certain token via the URI.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question