How to use cURL to get jSON data and decode the data?
I think this one will answer your question π $url=”https://…/api.php?action=getThreads&hash=123fajwersa&node_id=4&order_by=post_date&order=ββdesc&limit=1&grab_content&content_limit=1″; Using cURL // Initiate curl $ch = curl_init(); // Will return the response, if false it print the response curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Set the url curl_setopt($ch, CURLOPT_URL,$url); // Execute $result=curl_exec($ch); // Closing curl_close($ch); // Will dump a beauty json :3 var_dump(json_decode($result, true)); Using file_get_contents … Read more