486,510d485 < Function: fetchimages < Purpose: fetch the image urls from a web page < Input: $URI where you are fetching from < Output: $this->resultimages the image urls from the web page < \*======================================================================*/ < < function fetchimages($URI) < { < if($this->fetch($URI)) < { < if(is_array($this->results)) < { < for($x=0;$xresults);$x++) < $this->results[$x] = $this->_stripimages($this->results[$x]); < } < else < $this->results = $this->_stripimages($this->results); < return true; < } < else < return false; < } < < < /*======================================================================*\ 658,678d632 < /*======================================================================*\ < Function: _stripimages < Purpose: strip the image tags from an html document < Input: $document document to strip. < Output: $match an array of the image URLs < \*======================================================================*/ < < function _stripimages($document) < { < preg_match_all("/]*>/",$document,$elements); < < // catenate the matches < $match = implode("\r\n",$elements[1]); < < // return the links < return $match; < } < < < <