1. Go to this page and download the library: Download coderatio/curler 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/ */
coderatio / curler example snippets
$curler = new \Coderatio\Curler\Curler();
$curler->get('https://jsonplaceholder.typicode.com/todos');
$response = $curler->getResponse();
$data = [
'title' => 'Sample post',
'body' => 'This is a sample post',
'userId' => 1
];
$curler = new \Coderatio\Curler\Curler();
$request = $curler->post('https://jsonplaceholder.typicode.com/posts', $data);
$response = $curler->getResponse();