Guzzle is a HTTP client library for PHP, initially a wrapper library around cURL. It evolved to a transport agnostic PSR-7 compatible library. composer require guzzlehttp/guzzle
require __DIR__ . '/vendor/autoload.php';

$client = new GuzzleHttp\Client();
$response = $client->request('GET', '');
$json = json_decode($response->getBody());

echo $json->origin; //

Guzzle API

The main benefits of using Guzzle over cURL is the API it offers. Guzzle is an abstraction layer for http request. It uses cURL by default but you can use any other http client that you want.
 * Send an asynchronous request:

require __DIR__ . '/vendor/autoload.php';

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

$client = new Client();
$request = new Request('GET', '');

$promise = $client->sendAsync($request)->then(
    function ($response) {
        echo 'Response is completed! ';
        echo 'Response: ' . json_decode($response->getBody())->{'full_name'};

// Response is completed! 
// Response: guzzle/guzzle

  Last update: 149 days ago