$ua->no_visits() problem

Otis Gospodnetic (otisg@panther.middlebury.edu)
Sun, 24 Nov 1996 01:12:05 -0500 (EST)


Hello,

I noticed that when I try checking if my script already visited a certain web
server I need to do a check like this:

if ($ua->no_visits($u->host) <= 2) {
	# first visit, even though $ua->no_visits($u->host) actually gives
	# me 2, and not 1.   I guess that is because I use RobotUA, and not
	# plain UserAgent (robots.txt is then first visit)
}
else {
	# seen $u->host before
}

The problem is that checking $ua->no_visits() against 2 is not good enough
since sometimes $ua->no_visits() gives me 3 when I access a server for the
first time.  For example, try using RobotUA and fetching http://www.w3.org/
$ua->no_visits() will give 3 for the first visit.

Is there any way I can accurately check if my script has visited a certain web
server before or not using libwww-perl methods ?

Thanks,

Otis
-- 
eZines Database		 - 	<URL:http://www.dominis.com/Zines/>
eBooks Dominis Bookstore -	<URL:http://www.booksite.com/cgi-bin/zines>