|
-
December 10th, 2005, 09:51 AM
#1
useragent checking using perl problem
well this is a code it checks the useregent database if useragent found it will will gather info abt ips of search engine bots....the real problem is i have give full useragent name on database like : Googlebot/2.1 (+http://www.googlebot.com/bot.html).....i want something if i give "Google" in datbase it can auto check the full useragent string and if any words found it gathers info abt bot ips. how to do it ?
Code:
$search_engine = ();
foreach $agentbase (@register) {
next if ($agentbase =~ /^[#-]/);
next if ($agentbase =~ /^\s*$/);
chomp $agentbase;
if ( $user_agent eq $agentbase ){
$search_engine = 1;
last;
}
}
return;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|