⚝
One Hat Cyber Team
⚝
Your IP:
3.148.217.26
Server IP:
162.254.39.145
Server:
Linux premium289.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
favoaysf
/
www
/
vendor
/
spatie
/
crawler
/
src
/
View File Name :
CrawlerRobots.php
<?php namespace Spatie\Crawler; use Spatie\Robots\RobotsHeaders; use Spatie\Robots\RobotsMeta; class CrawlerRobots { protected RobotsHeaders $robotsHeaders; protected RobotsMeta $robotsMeta; protected bool $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; } }