PHP code example of dominikangerer / php-easy-client
1. Go to this page and download the library: Download dominikangerer/php-easy-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dominikangerer / php-easy-client example snippets
composer
// initialize with domain
$client = new \DominikAngerer\Client('https://raw.githubusercontent.com');
// Optionally set a cache
$client->setCache('filesytem', array('path' => 'cache'));
// execute a get Request and get the Body
$client->get('/DominikAngerer/default-datasources/master/country-iso2.json', array('time' => time()));
$data = $client->getBody();
// access the headers
$headers = $client->getHeaders();