• [MOD] Treat bots as users with less rights 3 0 5 1
Currently:  

Author Topic: [MOD] Treat bots as users with less rights  (Read 142230 times)

0 Members and 1 Guest are viewing this topic.

Offline exefire

  • Newbie
  • *
  • Posts: 30
  • FotoBomberos.com
    • View Profile
    • FotoBomberos.com
Re: [MOD] Treat bots as users with less rights
« Reply #45 on: June 01, 2006, 06:44:44 PM »
I know two yahoo bots (dont know if they have more).
Its identify itself as:
Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)
and
ia_archiver

In the code I used this to identify them:
Code: [Select]
      "ia_archiver" => "bot-yahoo",
      "Yahoo! Slurp" => "bot-yahoo",
      "help\.yahoo\.com" => "bot-yahoo",

i done this change, but when yahoo conects to my site, it's show "searchbot"... i know that is yahoo because when i ask for de I.P. in http://www.senderbase.org/search?searchString=68.142.249.44 and show me

Code: [Select]
Network Owner  INKTOMI CORPORATION
Domain inktomisearch.com
Date of first message seen from this address 2006-02-27
CIDR range 68.142.192.0/18
# of domains controlled by this network owner 6
Geography data
Country US
State CA
City San Mateo
Postal code 94404

so... if you click in http://inktomisearch.com it go to yahoo...

anyone have an idea for identificate yahoo bot?....

(sorry for my bad english :oops:)

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [MOD] Treat bots as users with less rights
« Reply #46 on: June 01, 2006, 07:15:51 PM »
So you did not change any .php file and since then all users are automatically logged in as a searchbot?
Hm, and if you upload your backups before the change, everything is fine?
MAяTRIX


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #47 on: June 02, 2006, 12:04:05 AM »
show the whole $robots array that you have.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [MOD] Treat bots as users with less rights
« Reply #48 on: June 02, 2006, 05:05:00 PM »
from sessions.php:

Code: [Select]
// mod GoogleBot
$site_sess = new Session();
$robots = array(
"FAST-WebCrawler" => "searchbot",
"Gulliver" => "searchbot",
"AltaVista" => "searchbot",
"Alexibot" => "searchbot",
"asterias" => "searchbot",
"BackDoorBot" => "searchbot",
"Black.Hole" => "searchbot",
"BlowFish" => "searchbot",
"BotALot" => "searchbot",
"NPBot" => "searchbot",
"Pompos" => "searchbot",
"Scooter" => "searchbot",
"SiteSnagger" => "searchbot",
"Slurp" => "searchbot",
"WebmasterWorldForumBot" => "searchbot",
"zyborg" => "searchbot",
"Google" => "googlebot",
"msnbot" => "searchbot",
"ZACATEK_CZ_BOT" => "searchbot",
"EARTHCOM.info" => "searchbot",
"sherlock" => "searchbot",
"Holmes" => "searchbot",
"ia_archiver" => "searchbot",
"lwp-trivial" => "searchbot",
"appie" => "searchbot",
"Scooter" => "searchbot",
"Gigabot" => "searchbot",
"Wget" => "searchbot",
"jyxobot" => "searchbot",
"Xenu Link Sleuth" => "searchbot",
"SeznamBot" => "searchbot",
);
foreach($robots as $key => $val) {
  if(!$_SERVER['HTTP_USER_AGENT'] || preg_match("/".$key."/i", $_SERVER['HTTP_USER_AGENT'])) {
    $site_sess->login($val, "12345");
    $user_bot = 1;
    break;
  }
}

and I only put the coding in the tempates:
example, details.html
Code: [Select]
{if user_loggedout}
               
<script type="text/javascript"><!--
google_ad_client = "pub-4867234679565045";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "F0F8FF";
google_color_link = "0000FF";
google_color_bg = "F0F8FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{endif user_loggedout}

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #49 on: June 03, 2006, 01:28:46 AM »
Ok, since you are affected too (right?) try to debug it with this:
below     $user_bot = 1; insert this:
Code: [Select]
echo $key;It should display the string that matched (dont worry about possible warning messages)
Then find that word in the array and remove the whole line with it, see if it helps.

P.S. needless to say that when you done debuging, remove the line above ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [MOD] Treat bots as users with less rights
« Reply #50 on: June 05, 2006, 06:12:00 PM »
ok it only seems to do it when googlebot is online, and then it only switches you to the googlebot user when you load the details.php page.  I looked through the code and have no reference to the google ads at all.  this is so weird!

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #51 on: June 08, 2006, 09:59:35 PM »
I think the following is interesting in connection with this MOD ...

...
So, there is a way to detect a bot and dont attach sessionid for it, but doing so will create new session on each request bot made, that is more server resources, because more files will be created in the server's sessions storage.
...

more here -> http://www.4homepages.de/forum/index.php?topic=6729.msg59251#msg59251
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [MOD] Treat bots as users with less rights
« Reply #52 on: June 09, 2006, 04:08:41 PM »
I removed the google ads and don't have a problem.  Doesn't really matter - i only made 12 cents (USD) in a week! but Damn, googlebot sure spiders the site a lot...

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #53 on: June 09, 2006, 04:19:31 PM »
... but Damn, googlebot sure spiders the site a lot ...
... googlebot is probably the most active user ...  :mrgreen:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [MOD] Treat bots as users with less rights
« Reply #54 on: June 09, 2006, 08:15:43 PM »
... googlebot is probably the most active user ...  :mrgreen:
Yep - especially googlebot... if just 1/3 of my users would be THAT active, I'd have bandwidth problems :D
MAяTRIX


Offline sajwal

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #55 on: August 03, 2006, 06:19:13 AM »
Hi,
   I can not find step 4.2 in ver 1.7.3
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------

can anybody keep me pushing?

Pls. i need this mod

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #56 on: August 03, 2006, 08:03:53 AM »
add it above
Code: [Select]
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline sajwal

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #57 on: August 03, 2006, 08:15:36 PM »
thankyou V@no for the help but

somebody asked a question in this thread as How is it possible to see this ?

currently active user : x members y guests and z bots online

no body answered him

pls. help this too i will be completed with this mod then

Offline sajwal

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #58 on: August 05, 2006, 12:05:01 AM »
thankyou V@no for the help but

somebody asked a question in this thread as How is it possible to see this ?

currently active user : x members y guests and z bots online

no body answered him

pls. help this too i will be completed with this mod then
please answer to this query of mine

Offline CCVBE

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #59 on: January 30, 2008, 10:16:44 AM »
Hello,

I have 2 questions to this:

1. Are the searchbots able to read PM and display in web?  8O

2. In my list "Last active users" are searchbot & co. most active. ;-) How can I get them out from this list?