Location: PHPKode > scripts > Spider website > spider-website/example.php
  // include Spider class file

  // create new Spider object
  $spider = new Spider('<enter your website URL here>');

  // allow files with extension *.txt being spidered

  // and disable files with that extension

  // set it to true if you want to see what is happening on the screen

  // start spidering website

  // all found and fetched links are in that variable
  $links = $spider->all_links;

  // print it out
Return current item: Spider website