1 | <?php |
||
14 | class Url extends XRobotsTagParser\Adapters\GuzzleHttp |
||
15 | { |
||
16 | /** |
||
17 | * GuzzleHttp config |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $config = [ |
||
21 | 'allow_redirects' => [ |
||
22 | 'referer' => true, |
||
23 | 'strict' => false, |
||
24 | ], |
||
25 | 'connect_timeout' => 30, |
||
26 | 'decode_content' => true, |
||
27 | 'headers' => [ |
||
28 | 'user-agent' => 'XRobotsTagParser-VIPnytt/1.0 (+https://github.com/VIPnytt/RobotsTagParser/blob/master/README.md)', |
||
29 | ], |
||
30 | 'http_errors' => false, |
||
31 | 'timeout' => 120, |
||
32 | 'verify' => true, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * Constructor |
||
37 | * |
||
38 | * @param string $url |
||
39 | * @param string $userAgent |
||
40 | * @throws XRobotsTagParser\Exceptions\XRobotsTagParserException |
||
41 | */ |
||
42 | public function __construct($url, $userAgent = '') |
||
51 | } |
||
52 |