1. Go to this page and download the library: Download asasi/component_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/ */
asasi / component_http example snippets
use by\component\http\HttpRequest;
$http = new HttpRequest;
$response = $http->ua('ByHttp')
->get('http://www.baidu.com');
echo 'html:', PHP_EOL, $response->body();