public static function getVisibilityIndexByApi($url = false, $db = false)
    {
        self::guardApiKey();
        self::guardApiCredits();

        $url = parent::getUrl($url);
        $domain = static::getDomainFromUrl($url);
        $database = static::getValidDatabase($db);

        $dataUrl = sprintf(Config\Services::SISTRIX_API_VI_URL, Config\ApiKeys::getSistrixApiAccessKey(), urlencode($domain), $database);

        $json = static::_getPage($dataUrl);

        if(empty($json)) {
            return parent::noDataDefaultValue();
        }

        $json_decoded = (Helper\Json::decode($json, true));
        if (!isset($json_decoded['answer'][0]['sichtbarkeitsindex'][0]['value'])) {
            return parent::noDataDefaultValue();
        }
        return $json_decoded['answer'][0]['sichtbarkeitsindex'][0]['value'];
    }
public static function getVisibilityIndexByApi($url = false, $db = false)
    {
        self::guardApiKey();
        self::guardApiCredits();

        $url = parent::getUrl($url);
        $domain = static::getDomainFromUrl($url);
        $database = static::getValidDatabase($db);

        $dataUrl = sprintf(Config\Services::SISTRIX_API_VI_URL, Config\ApiKeys::getSistrixApiAccessKey(), urlencode($domain), $database);

        $json = static::_getPage($dataUrl);

        if(empty($json)) {
            return parent::noDataDefaultValue();
        }

        $json_decoded = (Helper\Json::decode($json, true));
        if (!isset($json_decoded['answer'][0]['sichtbarkeitsindex'][0]['value'])) {
            return parent::noDataDefaultValue();
        }
        return $json_decoded['answer'][0]['sichtbarkeitsindex'][0]['value'];
    }
public static function getVisibilityIndexByApi ( $ url = false , $ db = false ) { self :: guardApiKey ( ) ; self :: guardApiCredits ( ) ; $ url = parent :: getUrl ( $ url ) ; $ domain = static :: getDomainFromUrl ( $ url ) ; $ database = static :: getValidDatabase ( $ db ) ; $ dataUrl = sprintf ( Config \ Services :: SISTRIX_API_VI_URL , Config \ ApiKeys :: getSistrixApiAccessKey ( ) , urlencode ( $ domain ) , $ database ) ; $ json = static :: _getPage ( $ dataUrl ) ; if ( empty ( $ json ) ) { return parent :: noDataDefaultValue ( ) ; } $ json_decoded = ( Helper \ Json :: decode ( $ json , true ) ) ; if ( ! isset ( $ json_decoded [ 'answer' ] [ 0 ] [ 'sichtbarkeitsindex' ] [ 0 ] [ 'value' ] ) ) { return parent :: noDataDefaultValue ( ) ; } return $ json_decoded [ 'answer' ] [ 0 ] [ 'sichtbarkeitsindex' ] [ 0 ] [ 'value' ] ; }
Returns the Sistrix visibility index by using the SISTRIX API

@access        public
@param   url   string     The URL to check.
@return        integer    Returns the Sistrix visibility index.
@link    http://www.sistrix.com/blog/870-sistrix-visibilityindex.html
Returns the Sistrix visibility index by using the SISTRIX API