How to cURL jSON data in PHP

This is something I always have to Google every time I need it so here it is.

If you are playing with API's it probably uses a GET method such as:

http://the-api.com/method/ID/get-results

This kinds of API usually return jSON data, which is great. Here's how cURL this URL and parse the jSON data using PHP:

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*