deemru/fetcher

Simple wrapper around cURL

1.0.3 2024-08-15 13:45 UTC

This package is auto-updated.

Last update: 2024-10-15 14:22:15 UTC


README

packagist php-v GitHub codacy license

Fetcher implements a simple wrapper around cURL.

  • Use fetch() for single/multi hosts served one-by-one
  • Use fetchMulti() for multi hosts served simultaneous

Usage

$nodes =
[
    'https://example.com',
    'https://testnode1.wavesnodes.com',
    'https://testnode2.wavesnodes.com',
    'https://testnode3.wavesnodes.com',
    'https://testnode4.wavesnodes.com',
];

echo Fetcher::hosts( $nodes )->fetch( '/blocks/height' );

Requirements

Installation

Require through Composer:

composer require deemru/fetcher