1. Go to this page and download the library: Download uengage/curl-tracker 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/ */
CurlHook::init([
'sample_rate' => 25, // Track only 25% of requests
'backend' => 'pushgateway'
]);
use CurlTracker\CurlHook;
CurlHook::init($config)->enable();
// Your existing code works unchanged
$ch = curl_init('https://api.example.com');
curl_exec($ch);
curl_close($ch);
use CurlTracker\CurlWrapper;
CurlWrapper::init($config);
// Replace curl_* with CurlWrapper::curl_*
$ch = CurlWrapper::curl_init('https://api.example.com');
CurlWrapper::curl_exec($ch);
CurlWrapper::curl_close($ch);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.