PHP code example of jackal / lighthouse-client
1. Go to this page and download the library: Download jackal/lighthouse-client 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/ */
jackal / lighthouse-client example snippets
$client = new \Jackal\Lighthouse\LighthouseClient([
'path' => __DIR__ . '/output.json',
'interactive' => false,
]);
$result = $client->run('https://www.google.com/');
echo "\n";
echo 'Performance: ' . $result->getPerformance() . "\n";
echo 'Accessibility: ' . $result->getAccessibility() . "\n";
echo 'Best Practices: ' . $result->getBestPractices() . "\n";
echo 'SEO: ' . $result->getSEO() . "\n";
echo 'Progressive app: ' . $result->getProgressiveWebApp() . "\n";