examples/analyze_url_with_keyword.php
<?php
/**
* Web page analyze example
*
* Executes web page full seo analyze.
*/
require_once(__DIR__ . '/../vendor/autoload.php');
use SeoAnalyzer\Analyzer;
try {
$results = (new Analyzer())->analyzeUrl('https://www.msn.com/en-us', 'msn');
} catch (\SeoAnalyzer\HttpClient\Exception\HttpException $e) {
echo "Error loading page: " . $e->getMessage();
} catch (ReflectionException $e) {
echo "Error loading metric file: " . $e->getMessage();
}
print_r($results);