One Hat Cyber Team
Your IP :
3.145.173.144
Server IP :
104.21.96.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
gftag.com
/
vendor
/
spatie
/
crawler
/
src
/
View File Name :
CrawlerRobots.php
<?php namespace Spatie\Crawler; use Spatie\Robots\RobotsHeaders; use Spatie\Robots\RobotsMeta; class CrawlerRobots { /** @var \Spatie\Robots\RobotsHeaders */ protected $robotsHeaders; /** @var \Spatie\Robots\RobotsMeta */ protected $robotsMeta; /** @var bool */ protected $mustRespectRobots; public function __construct(array $headers, string $body, bool $mustRespectRobots) { $this->robotsHeaders = RobotsHeaders::create($headers); $this->robotsMeta = RobotsMeta::create($body); $this->mustRespectRobots = $mustRespectRobots; } public function mayIndex(): bool { if (! $this->mustRespectRobots) { return true; } if (! $this->robotsHeaders->mayIndex()) { return false; } if (! $this->robotsMeta->mayIndex()) { return false; } return true; } public function mayFollow(): bool { if (! $this->mustRespectRobots) { return true; } if (! $this->robotsHeaders->mayFollow()) { return false; } if (! $this->robotsMeta->mayFollow()) { return false; } return true; } }