PHP code example of clarkeash / laravel-http-stats
1. Go to this page and download the library: Download clarkeash/laravel-http-stats 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/ */
clarkeash / laravel-http-stats example snippets
use Illuminate\Support\Facades\Http;
$response = Http::get('http://test.com');
$response->stats()->lookup(); // dns time in ms
$response->stats()->connect(); // tcp connection time in ms
$response->stats()->ssl(); // ssl handshake time in ms
$response->stats()->pretransfer(); // Protocol negotiation time in ms
$response->stats()->redirect(); // redirect time in ms
$response->stats()->ttfb(); // time to first byte in ms
$response->stats()->total(); // total time in ms