March 2012
Intermediate to advanced
392 pages
10h 17m
English
The example script initializes by including the LIB_http and LIB_parse libraries you read about earlier. It also creates an array where the parsed data is stored, and it sets the product counter to zero, as shown in Example 8-1.
Example 8-1. Initializing the price-monitoring webbot
# Initialization
include("LIB_http.php");
include("LIB_parse.php");
$product_array=array();
$product_count=0;
# Download the target (practice store) web page
$target = "http://www.WebbotsSpidersScreenScrapers.com/example_store";
$web_page = http_get($target, "");After initialization, the script proceeds to download the target web page with the get_http() function described in Chapter 3.
After downloading the web page, the script ...
Read now
Unlock full access