src/RobotsTxtParser/Core/Directives/DisAllow.php 1 location
|
@@ 131-135 (lines=5) @@
|
| 128 |
|
{ |
| 129 |
|
// Encode |
| 130 |
|
$url = $this->urlEncode($url); |
| 131 |
|
if (mb_stripos($url, '/') === 0) { |
| 132 |
|
// Strip fragments |
| 133 |
|
$url = mb_split('#', $url)[0]; |
| 134 |
|
return $url; |
| 135 |
|
} |
| 136 |
|
if (!$this->urlValidate($url)) { |
| 137 |
|
throw new Exceptions\ClientException('Invalid URL'); |
| 138 |
|
} |
src/RobotsTxtParser/Request.php 1 location
|
@@ 125-127 (lines=3) @@
|
| 122 |
|
foreach ($headers as $header) { |
| 123 |
|
$split = array_map('trim', mb_split($delimiter, $header)); |
| 124 |
|
foreach ($split as $string) { |
| 125 |
|
if (mb_stripos($string, $part . '=') === 0) { |
| 126 |
|
return mb_split('=', $string, 2)[1]; |
| 127 |
|
} |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
return false; |