• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/engine/yandex.php
  • Класс: BitrixSeoEngineYandex
  • Вызов: Yandex::verifySite
public function verifySite($domain, $verType = 'HTML_FILE')
{
	if (!in_array($verType, self::$verificationTypes))
		return array('error' => array('message' => 'incorrect verification type'));
	
	$domain = ToLower($domain);
	$hostId = $this->getHostId($domain);
	
	$serviceUrl = $this->getServiceUrl($this->userId, $hostId, self::API_VERIFICATION_URL, array('verification_type' => $verType));
	$queryResult = $this->query($serviceUrl, 'POST');
	if ($queryResult->getStatus() == self::HTTP_STATUS_OK && $queryResult->getResult() <> '')
	{
		$result = Json::decode($queryResult->getResult());
		
		return array($domain => array('verification' => $result['verification_state']));
	}
	else
	{
		throw new EngineYandexException($queryResult);
	}
}