The Search-Ranking Webbot Script

The following section describes key aspects of the webbot's script. The latest version of this script is available for download at this book's website.

Note

If you want to experiment with the code, you should download the webbot's script. I have simplified the scripts shown here for demonstration purposes.

Initializing Variables

Initialization consists of including libraries and identifying the subject website and search criteria, as shown in Listing 11-1.

 # Initialization // Include libraries include("LIB_http.php"); include("LIB_parse.php"); // Identify the search term and URL combination $desired_site = "www.loremianam.com"; $search_term = "webbots"; // Initialize other miscellaneous variables $page_index = 0; $url_found ...

Get Webbots, Spiders, and Screen Scrapers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.