CloudFlareScraper
in package
FinalYes
Legacy Cloudflare challenge workaround for loading protected pages through XMLHttpRequest.
Included for historical compatibility only. This API is out of support and should not be used in new code.
Tags
Table of Contents
Properties
- $cookieFile : mixed
- $lastURI : mixed
- $trySolving : mixed
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __unserialize() : void
- getFile() : string|null
- getXPath() : DOMXPath|null
- _httpRequest() : mixed
- _isProtected() : bool
- _loadXPath() : DOMXPath
- _solveChallenge() : void
Properties
$cookieFile
protected
mixed
$cookieFile
$lastURI
protected
mixed
$lastURI
$trySolving
protected
mixed
$trySolving
Methods
__construct()
public
__construct([mixed $cookieFile = null ][, mixed $trySolving = true ]) : mixed
Parameters
- $cookieFile : mixed = null
- $trySolving : mixed = true
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
getFile()
public
getFile(mixed $uri) : string|null
Parameters
- $uri : mixed
Return values
string|nullgetXPath()
public
getXPath(mixed $uri) : DOMXPath|null
Parameters
- $uri : mixed
Return values
DOMXPath|null_httpRequest()
protected
_httpRequest(mixed $uri) : mixed
Parameters
- $uri : mixed
_isProtected()
protected
_isProtected(mixed $html) : bool
Parameters
- $html : mixed
Return values
bool_loadXPath()
protected
_loadXPath(DOMDocument $doc) : DOMXPath
Parameters
- $doc : DOMDocument
Return values
DOMXPath_solveChallenge()
protected
_solveChallenge(mixed $requestURI, DOMDocument $htmlDoc, mixed $html) : void
Parameters
- $requestURI : mixed
- $htmlDoc : DOMDocument
- $html : mixed