PHP code example of shahradelahi / easy-http
1. Go to this page and download the library: Download shahradelahi/easy-http 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/ */
shahradelahi / easy-http example snippets
$client = new \EasyHttp\HttpClient();
$response = $client->get('https://httpbin.org/get');
echo $response->getStatusCode(); // 200
echo $response->getHeaderLine('content-type'); // 'application/json'
echo $response->getBody(); // {"args":{},"headers":{},"origin":"**", ...}
sudo apt-get install curl php-curl
curl -s https://getcomposer.org/installer | php
php composer.phar install
php composer.phar