Answer the question
In order to leave comments, you need to log in
How to send a response to a request from another site?
Hello. I have one problem, I'm not familiar with PHP, but I need to make a site that, upon request from another site, should return a json file, tell someone how to do this? Those. For example, if we make such a request: localhost/posts, then that json should be returned in response.
Answer the question
In order to leave comments, you need to log in
site to local
Just place a posts file with the content you want in document_root and set up the webserver to serve it. PHP is not needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question