1. Go to this page and download the library: Download swnck/pure-request 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/ */
swnck / pure-request example snippets
$request = new PureRequest((new RequestConfiguration())
->setReturnTransfer(true) // Return the transfer as a string of the return value of curl_exec() instead of outputting it out directly
->setFollowLocation(true) // Follow any "Location: " header that the server sends as part of the HTTP header (note this is recursive, PHP will follow as many "Location: " headers that it is sent, unless CURLOPT_MAXREDIRS is set)
->setConnectTimeout(10) // The maximum number of seconds to allow cURL functions to execute
);