By : j4ke Published On Saturday, September 23, 2023, 02:39 In PHP Scripts
The HTTP_R class is a simple PHP class what allows you to request external or local files with ease, the class has four file request methods plus a auto detect method. The auto detect method detects what file request method can be used on your host and then uses it to request the data, the auto detect method is ideal to use if you’re not sure that your host supports curl, file_get_contents, or other request methods.
// Require the class.
require_once('HTTP_R.class.php');
// Request & decode the data.
$request = HTTP_R::M0('http://marketplace.envato.com/api/v3/user:j4ke.json');
$decode = json_decode($request, true);
// Return the wanted data.
echo $decode['user']['username'] . ' has made ' . $decode['user']['sales'] . ' sales.';
Updates are free to anyone who has purchased this item with any type of license.
Please check the support section of my profile, feel free to suggest new features, ask questions, and anything else related to this item by sending me a PM or commenting on this item. If you have purchased this item and like it please remember to rate it.