1

I am using this WebCrawler class http://phpcrawl.cuab.de. There is a method named "setTmpFile()" http://phpcrawl.cuab.de/classreference.html#settmpfile. I want to know that how can I use this method? Please suggest me some Good example.

Seek Php
  • 163
  • 2
  • 3
  • 12

1 Answers1

1

The method streams downloaded content to the specified file. I don't know why you'll need to change this file (PHPCrawl will create one automatically), but here is an example:

$crawler = new MyCrawler();
$tmpFilename = tempnam('/tmp', 'crawler_');
$crawler->setTmpFile($tmpFilename);
galymzhan
  • 5,505
  • 2
  • 29
  • 45