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 : string
- $lastURI : string|null
- $trySolving : bool
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __unserialize() : void
- getFile() : string|null
- getXPath() : DOMXPath|null
- _httpRequest() : XMLHttpRequest|null
- _isProtected() : bool
- _loadXPath() : DOMXPath
- _solveChallenge() : XMLHttpRequest|null
Properties
$cookieFile
protected
string
$cookieFile
$lastURI
protected
string|null
$lastURI
$trySolving
protected
bool
$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) : XMLHttpRequest|null
Parameters
- $uri : mixed
Return values
XMLHttpRequest|null_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) : XMLHttpRequest|null
Parameters
- $requestURI : mixed
- $htmlDoc : DOMDocument
- $html : mixed