Menu

user_abort

Help
Geo
2011-07-24
2013-04-09
  • Geo

    Geo - 2011-07-24

    Hello,

    I didn't catch how to implement user abortion. Could you, please, drop an example, explaining where to insert the command and how? Would be great. Thank you in advance.

     
  • Uwe Hunfeld

    Uwe Hunfeld - 2011-07-27

    Hi,

    it's possible to abort the crawling-process by returning any negative value from the handlePageData()-method.

    Just an example:

    // ...
    class MyCrawler extends PHPCrawler 
    {
      function handlePageData(&$page_data) 
      {
        // ...
        // Will stop the crawling-process as soon as the current URL contains "something"
        if (preg_match("#something#", $page_data["url"])) return -1;
      }
    }
    // ...
    

    Is it this what you mean with "user abortion"?

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.