Example #1
0
 public static function getPagespeedAnalysis($url = false)
 {
     if ('' == Config\ApiKeys::GOOGLE_SIMPLE_API_ACCESS_KEY) {
         throw new E('In order to use the PageSpeed API, you must obtain
             and set an API key first (see SEOstats\\Config\\ApiKeys.php).');
         exit(0);
     }
     $url = parent::getUrl($url);
     $url = sprintf(Config\Services::GOOGLE_PAGESPEED_URL, $url, Config\ApiKeys::GOOGLE_SIMPLE_API_ACCESS_KEY);
     $ret = parent::_getPage($url);
     return Helper\Json::decode($ret);
 }
Example #2
0
 private static function getApiData($url)
 {
     $json = parent::_getPage($url);
     return Helper\Json::decode($json, true);
 }