403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/seo/lib/Webmaster/Engine/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/seo/lib/Webmaster/Engine/Google.php
<?php

namespace Bitrix\Seo\Webmaster\Engine;

use Bitrix\Main\Text\HtmlFilter;
use Bitrix\Main\Web\Json;
use Bitrix\Seo\Retargeting;
use Bitrix\Seo\Retargeting\Response;
use Bitrix\Seo\Webmaster;

/**
 * Class MediaVkontakte
 */
class Google extends Retargeting\BaseApiObject
{
	public const TYPE_CODE = Webmaster\Service::TYPE_GOOGLE;

	/**
	 * Get list of added sites with statuses
	 * @return Response
	 * @throws \Bitrix\Main\SystemException
	 */
	public function getSites(): Response
	{
		return $this->getRequest()->send([
			'methodName' => 'webmaster.sites.get',
		]);
	}

	/**
	 * Add site to webmaster
	 * @param string $site - url of site with protocol
	 * @return Response
	 * @throws \Bitrix\Main\SystemException
	 */
	public function addSite(string $site): Response
	{
		return $this->getRequest()->send([
			'methodName' => 'webmaster.sites.add',
			'parameters' => [
				'site' => HtmlFilter::encode($site),
			],
		]);
	}

	/**
	 * Get token-string for naming verify file
	 * @param array $data - site object
	 * @return Response
	 * @throws \Bitrix\Main\ArgumentException
	 * @throws \Bitrix\Main\SystemException
	 */
	public function getVerifyToken(array $data): Response
	{
		return $this->getRequest()->send([
			'methodName' => 'webmaster.verify.token.get',
			'parameters' => [
				'data' => Json::encode($data),
			],
		]);
	}

	/**
	 * Pass site to verify
	 * @param array $data - site object
	 * @return Response
	 * @throws \Bitrix\Main\ArgumentException
	 * @throws \Bitrix\Main\SystemException
	 */
	public function verifySite(array $data): Response
	{
		return $this->getRequest()->send([
			'methodName' => 'webmaster.verify.site',
			'parameters' => [
				'data' => Json::encode($data),
			],
		]);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit