コード例 #1
0
ファイル: crawler.php プロジェクト: olscore/ornithopter.io
 /**
  * Initialize the crawler class.
  *
  * @return void
  */
 public function __construct()
 {
     // Create a new web agent
     self::$data['crawler'] = \io::libraries('agent');
     // Crawler should be faster
     self::$data['timeout'] = 2500;
     // Set timeout within the user agent
     self::$data['crawler']->timeout(self::$data['timeout']);
     // Crawler disregards SSL verification
     self::$data['crawler']->secure(false);
     // Register shortcut aliases using io::method();
     \io::alias(__CLASS__, ['crawler', 'crawl', 'wait']);
 }