1. Go to this page and download the library: Download radek011200/curl-client-php 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/ */
radek011200 / curl-client-php example snippets
composer
use Radek011200\CurlClientPhp\Curl;
use Radek011200\CurlClientPhp\Request\Options;
$curl = new Curl();
$options = new Options();
$response = $curl->Get('https://github.com/Radek011200/RClientCurl', $options);
var_dump($response);
use Radek011200\CurlClientPhp\Request\Options;
use Radek011200\CurlClientPhp\Request\Header;
use Radek011200\CurlClientPhp\Request\CurlOpt;
$options = (new Options())
->addHeader(new Header('key', 'value'))
->addHeader(New Header('Accept', 'application/json'))
->addCurlOPT(new CurlOpt(CURLOPT_HEADER, 1));
var_dump($options->getCurlOPT(), $options->getHeaders());
use Radek011200\CurlClientPhp\Request\Options;
$options = (new Options())->addJwtToken('token');
use Radek011200\CurlClientPhp\Request\Options;
$options = (new Options())->addBasicAuthLoginData('login', 'password');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.