I’m wondering, is there an easy way to perform a REST API GET call? I’ve been reading about cURL, but is that a good way to do it?
I also came across php://input but I have no idea how to use it. Does anyone have an example for me?
I don’t need advanced API client stuff, I just need to perform a GET call to a certain URL to get some JSON data that will be parsed by the client.
Thanks!
You can use
file_get_contentsif the fopen wrappers are enabled. See: http://php.net/manual/en/function.file-get-contents.phpIf they are not, and you cannot fix that because your host doesn’t allow it,
cURLis a good method to use.