Answer the question
In order to leave comments, you need to log in
How to properly process requests in PHP?
Only now an interesting task has appeared, to make a file that will receive json data from another server, and process it. With the processing of these questions, questions cannot arise, but the processing of the request itself has baffled me. I need to check that the request contains json and a certain header, so that no one could just throw requests, but that’s bad luck, I can’t find examples to understand how it all works.
I used curl to send requests and accept responses to these requests, but I don’t understand how to make a handler that could check the data that comes and give the correct answer.
Answer the question
In order to leave comments, you need to log in
I need to check that the request contains json and a certain header, so that no one could just throw requestshistorically this is done through authorization
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question