Source of file SeoHeroToolAnalysisW3CValidator.php
Size: 0,701 Bytes - Last Modified: 2021-12-23T10:06:43+00:00
/var/www/docs.ssmods.com/process/src/src/models/SeoHeroToolAnalysisW3CValidator.php
1234567891011121314151617181920212223242526272829 | <?php namespace nomidi\SeoHeroToolAnalysis; class SeoHeroToolAnalysisW3CValidator { public static function checkData($Link) { return self::getValidationResults($Link); } private static function getValidationResults($Link) { $opts = [ 'http' => [ 'method' => 'GET', 'header' => [ 'User-Agent: PHP' ] ] ]; $context = stream_context_create($opts); $json_url = 'https://validator.w3.org/nu/?doc='. urlencode($Link) .'&out=json'; $json = file_get_contents($json_url, false, $context); $json_output = json_decode($json); return $json_output; } } |