PHP code example of fyre / curl

1. Go to this page and download the library: Download fyre/curl 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/ */

    

fyre / curl example snippets


use Fyre\CURL\Curl;

$response = Curl::delete($url, $options);

$response = Curl::get($url, $options);

$response = Curl::head($url, $options);

$response = Curl::options($url, $options);

$response = Curl::patch($url, $data, $options);

$response = Curl::post($url, $data, $options);

$response = Curl::put($url, $data, $options);

use Fyre\CURL\CurlRequest;

$request = new CurlRequest($url, $options);

$response = $request->send();

use Fyre\CURL\CurlResponse;

$data = $response->getJson($associative, $depth, $flags);