Method: PHPCrawler::setRequestDelay()



Sets a delay for every HTTP-requests the crawler executes.
Signature:

public setRequestDelay($time)

Parameters:

$time float The request-delay-time in seconds.

Returns:

bool 

Description:

The crawler will wait for the given time after every request it does, regardless of
the mode it runs in (single-/multiprocessmode).

Example 1:// Let's the crawler wait for a half second before every request.
$crawler->setRequestDelay(0.5);

Example 2:// Limit the request-rate to 100 requests per minute
$crawler->setRequestDelay(60/100);