When you create a simple request without any special REST client, you can do it just by using curl. When you need to do curl request, it's not a good practise to do it on every page load. So the results should be cached.
Source code viewer
// Set error reporting level. // Parameters. $username = ''; $password = ''; $location = 'https://browse-tutorials.com'; 'limit' => 20, ); $cacheFileName = 'json.cache.txt'; $cacheUpdateMin = 30; // Check if the file exists and file timestamp against current time. // Curl request to get the json. // Write to the cache file. // Decode the results. } else { // Load the results directly from cache. } Programming Language: PHP