Crawling a complete site:
construct the Crawler class with a string representing the URL you want to crawl
call getAllLinks(); on the object to return an array of found links
To crawl the site for a specific word or phrase construct the Crawler class with with a string representing the URL you want to crawl and the phrase you are looking for.
Reference the “thelink” variable owned by the Crawler object for the link the phrase were found on.
|