I'm trying to integrate with an API that sends GET and POST requests to preset URLs. The urls are in the given format: http://example.com/api/X where X would change between different requests.
For instance: http://example.com/api/status , http://example.com/api/update etc...
I want to be able to receive the request via PHP and send a response, but since there is no filename defined at the end of the URL I don't understand how to do so. I can't use http://example.com/api/status/index.php , since this would return a 301 response.
How should I approach this?