示例#1
0
 /**
  * Initiates a new crawler.
  */
 public function __construct()
 {
     // Create uniqid for this crawlerinstance
     $this->crawler_uniqid = getmypid() . time();
     // PageRequest-class
     $this->PageRequest = new PHPCrawlerHTTPRequest();
     $this->PageRequest->setHeaderCheckCallbackFunction($this, "handleHeaderInfo");
     // URL-filter-class
     $this->UrlFilter = new PHPCrawlerURLFilter();
     // RobotsTxtParser-class
     $this->RobotsTxtParser = new PHPCrawlerRobotsTxtParser();
     // ProcessReport-class
     $this->UserSendDataCache = new PHPCrawlerUserSendDataCache();
     // Set default temp-dir
     $this->working_base_directory = PHPCrawlerUtils::getSystemTempDir();
 }