View Single Post
Old 12-16-2003, 03:03 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539

Quote:
Originally posted by fr :: anonymus
Charter : A bug in you code =>

// Spidering ...
$my_spider_limit = 0;
while(($level <= $limit) && ($my_spider_limit < 15)) {
$my_spider_limit++;

You must change && by OR :

// Spidering ...
$my_spider_limit = 0;
while(($level <= $limit) OR ($my_spider_limit < 15)) {
$my_spider_limit++;

Spider must stop when
$level <= $limit
OR when
$my_spider_limit <15

Isn't it ?

Hi. Thanks, but in that code I wanted the 'and' in place.

It was meant as when $level <= $limit and when $my_spider_limit < 15 do the loop, but it was the wrong piece of code to edit because all it does is basically limit the seach depth to fourteen without affecting the number of links found in a page. Silly me.

Please see this thread instead.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote