| Download - HTTP_R File Request Class (Miscellaneous) - CodeCanyon |
HTTP_R File Request Class Version 1.0
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 your host supports curl, file_get_contents, or other request methods.
Example Using Envato API:
// Require the class.
require 'HTTP_R.class.php';
// Request & decode the data.
$request = HTTP_R::M0('http://ift.tt/1qsquGF');
$decode = json_decode($request, true);
// Return the wanted data.
echo $decode['user']['username'] . ' has made ' . $data['user']['sales'] . ' sales.';
