Bots mod / Guest sessions MOD

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

Bots mod / Guest sessions MOD

Postby Peter77 » Fri Jun 09, 2006 12:57 am

Hi dcz, Sorry if this is not in the right forum.
like you already know, a lot of us are using CyberAliens guest sessions MOD. I wanted to try out a mod that requires to alter just a bit the guest sessions MOD. [BETA]Search Bot Indexing MOD v1.3.0.
well actually since the MOD already takes care of SID's, I asked if it could still work if I kept the Guest sessions MOD. turns out I would need to at least modify a bit of CyberAliens code.


The mod author came up with this:


Code: Select all
#-----[ OPEN ]------------------------------------------
#

includes/sessions.php



#
#-----[ FIND ]------------------------------------------
#

//
   // Create or update the session
   //

#
#-----[ BEFORE, ADD ]------------------------------------------
#
   $robot = ( ( defined('IS_ROBOT') ) ? IS_ROBOT : 0 );


#
#-----[ FIND ]------------------------------------------
#

$sql_ip = $user_id == ANONYMOUS ? " AND session_ip = '$user_ip'" : '';
   $sql = "UPDATE " . SESSIONS_TABLE . "
      SET session_ip = '$user_ip', session_start = $current_time, session_time = $current_time, session_page =

$page_id, session_logged_in = $login, session_admin = $admin
      WHERE session_id = '" . $session_id . "' $sql_ip
         AND session_user_id = '$user_id'";


#
#-----[ IN-LINE FIND ]------------------------------------------
#

session_page = $page_id, session_logged_in = $login


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, is_robot = '$robot'

#
#-----[ FIND ]------------------------------------------
#

$sql = "INSERT INTO " . SESSIONS_TABLE . "
         (session_id, session_user_id, session_start, session_time, session_ip, session_page,

session_logged_in, session_admin)
         

#
#-----[ IN-LINE FIND ]------------------------------------------
#

session_page, session_logged_in

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, is_robot

#
#-----[ FIND ]------------------------------------------
#


VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";



#
#-----[ IN-LINE FIND ]------------------------------------------
#

'$user_ip', $page_id, $login

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, '$robot'

#
#-----[ FIND ]------------------------------------------
#

global $SID;

if ( !empty($SID) && !preg_match('#sid=#', $url) )

#
#-----[ REPLACE WITH ]------------------------------------------
#

global $SID;

if ( !empty($SID) && !preg_match('#sid=#', $url) && !IS_ROBOT )

#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
#EOM


From this post over at phpbb.com

I'm wondering what your feedback on this would be? well my question would be not so much about the guest sessions MOD, but would it have any negative affect on the SEO advanced MOD? i'm thinking as long as SID's are taken care of, then its "ok for the SEO MOD...

Thanks.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Advertisement

Postby dcz » Fri Jun 09, 2006 1:23 am

For the bots mod to work together with the guest sessions mod, just do not apply the last change you posted e.g :

Do not apply this :

Code: Select all
#
#-----[ FIND ]------------------------------------------
#

global $SID;

if ( !empty($SID) && !preg_match('#sid=#', $url) )

#
#-----[ REPLACE WITH ]------------------------------------------
#

global $SID;

if ( !empty($SID) && !preg_match('#sid=#', $url) && !IS_ROBOT )


and it will work perfectly ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Fri Jun 09, 2006 1:30 am

Wow that was fast! okay Gracias, I will try it over the weekend. :)
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Fri Jun 09, 2006 1:35 am

it's because I used the bots mod ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Fri Jun 09, 2006 2:02 am

LOL ahh okay! seems to be a pretty useful MOD to have. 8)
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Fri Jun 09, 2006 9:26 am

Robotstats is an handy alternative to really track bots, even though they won't show up in viewonline.

With this one you will be able to exactly know where and how many times the bots passed by.

Demo
Download

The script need to be patched a bit on decent settings, but no big deal :

Before you install, just do the following :

Open :

Code: Select all
install.php


Add this at the begining of the scritp :

Code: Select all
$op         = ( !empty($_REQUEST['op']) ) ? $_REQUEST['op'] : '';
$lang       = ( !empty($_REQUEST['lang']) ) ? $_REQUEST['lang'] : '';
$chemin     = ( !empty($_REQUEST['chemin']) ) ? $_REQUEST['chemin'] : '';
$url        = ( !empty($_REQUEST['url']) ) ? $_REQUEST['url'] : '';
$s_db       = ( !empty($_REQUEST['s_db']) ) ? $_REQUEST['s_db'] : '';
$u_db       = ( !empty($_REQUEST['u_db']) ) ? $_REQUEST['u_db'] : '';
$mp_db      = ( !empty($_REQUEST['mp_db']) ) ? $_REQUEST['mp_db'] : '';
$n_db       = ( !empty($_REQUEST['n_db']) ) ? $_REQUEST['n_db'] : '';
$ok_install = ( !empty($_REQUEST['ok_install']) ) ? $_REQUEST['ok_install'] : '';
$tbl_robots = ( !empty($_REQUEST['tbl_robots']) ) ? $_REQUEST['tbl_robots'] : '';
$tbl_log    = ( !empty($_REQUEST['tbl_log']) ) ? $_REQUEST['tbl_log'] : '';
$tbl_url    = ( !empty($_REQUEST['tbl_url']) ) ? $_REQUEST['tbl_url'] : '';
$u_adm      = ( !empty($_REQUEST['u_adm']) ) ? $_REQUEST['u_adm'] : '';
$mp_adm     = ( !empty($_REQUEST['mp_adm']) ) ? $_REQUEST['mp_adm'] : '';
$ok_url     = ( !empty($_REQUEST['ok_url']) ) ? $_REQUEST['ok_url'] : '';
$ok_write   = ( !empty($_REQUEST['ok_write']) ) ? $_REQUEST['ok_write'] : '';


Then, still in the robotstats files, open :
Code: Select all
header.php


Add this at the beginning of the script :

Code: Select all
/**

* This library grabs the names and values of the variables sent or posted to a

* script in the $_* arrays and sets simple globals variables from them. It does

* the same work for the $PHP_SELF, $HTTP_ACCEPT_LANGUAGE and

* $HTTP_AUTHORIZATION variables.

*

* loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+

*/



function PMA_gpc_extract($array, &$target) {

    if (!is_array($array)) {

        return FALSE;

    }

    $is_magic_quotes = get_magic_quotes_gpc();

    foreach($array AS $key => $value) {

        if (is_array($value)) {

            // there could be a variable coming from a cookie of

            // another application, with the same name as this array

            unset($target[$key]);



            PMA_gpc_extract($value, $target[$key]);

        } else if ($is_magic_quotes) {

            $target[$key] = stripslashes($value);

        } else {

            $target[$key] = $value;

        }

    }

    return TRUE;

}



if (!empty($_GET)) {

    PMA_gpc_extract($_GET, $GLOBALS);

} // end if



if (!empty($_POST)) {

    PMA_gpc_extract($_POST, $GLOBALS);

} // end if



if (!empty($_FILES)) {

    foreach($_FILES AS $name => $value) {

        $$name = $value['tmp_name'];

        ${$name . '_name'} = $value['name'];

    }

} // end if



if (!empty($_SERVER)) {

    $server_vars = array('PHP_SELF', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_AUTHORIZATION');

    foreach ($server_vars as $current) {

        if (isset($_SERVER[$current])) {

            $$current = $_SERVER[$current];

        } elseif (!isset($$current)) {

            $$current = '';

        }

    }

    unset($server_vars, $current);

} // end if



// Security fix: disallow accessing serious server files via "?goto="

if (isset($goto) && strpos(' ' . $goto, '/') > 0 && substr($goto, 0, 2) != './') {

    unset($goto);

} // end if



Those two from http://www.go-cms.net/xforum-vt18-robot ... ement.html

Then, to install with phpBB :
Just create a folder where you put the provided robostats files, run the patched install.php and delete it.
Then

Open :

Code: Select all
includes/page_tail.php


Find :
Code: Select all
exit;


Before add :

Code: Select all
include("./robotstats/robotstats.inc.php");


And, my advice is this should not remain public, you should lock the robotstats folder with .htpasswd. It better for security as well, but I'd not want anybody to massively explore those pages ;)

Thus the added link to you stat that is added in the page tail should as well be removed (it's linked to your web site's stats).

To do so open :
Code: Select all
robotstats.inc.php


Find and delete or comment :
Code: Select all
echo '<BR><DIV ALIGN="center"><A HREF="'.RS_WWW.'/" TARGET="_blank"><IMG SRC="'.RS_WWW.'/images/rs8831.gif" BORDER=0 WIDTH=88 HEIGHT=31 ALT="Robotstats '.$version.'"></A></DIV>';
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Fri Jun 09, 2006 11:18 am

That seems intresting. too bad my own hosting doesn't have tools such as this. but thats cool that it can work with phpbb. I will give it a try! 8)
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby AmirAbbas » Sun Jun 11, 2006 6:51 am

dcz wrote:it's because I used the bots mod ;)


hello

is it a good mod
i asked you about this mod but you said that it can be harmful :shock:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Sun Jun 11, 2006 6:20 pm

Well robostats is a lot more efficient to track bots, because it will show you the complete list of url indexed, day after day.

The bot's mod is just counting how many time they came, the SID removal is quite heavy if we consider all that's being performed by the mod together with it and using the only interesting feature is risked.

The bots mod is able to output an optimized template for bots, lighter page, better indexing, but since you will then output a different one to guests, this is showing a different page to users than to bots.

And the recognition method is using the bot's IP and User Agent, so technically this is cloaking and cloaking is a reason to get banned by Google.

For sure the text content is very similar, exactly the same for posts, so you don't really cheat Search Engines, there is no spam indexing, but still, by removing content you had weight to the one still shown to bots, and this can change the PageRanking and thus the Search Results.

Google is not really clear about cloaking, besides telling they do not permit cloaking method and will ban site using it. So this is not something I'd go for ;)

Here a piece of history :lol:
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Sun Jun 11, 2006 6:37 pm

dcz wrote:The bots mod is able to output an optimized template for bots, lighter page, better indexing, but since you will then output a different one to guests, this is showing a different page to users than to bots.


I noticed this when I installed the MOD yesterday. but I figured it is okay as long as the entire board is set to one dufault template.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Sun Jun 11, 2006 6:39 pm

Yes but then, you are using a code being a bit heavy just to count bot's visits.

Robostast is doing a lot better job for this part.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Sun Jun 11, 2006 6:44 pm

dcz wrote:Yes but then, you are using a code being a bit heavy just to count bot's visits.

Robostast is doing a lot better job for this part.


Oohh so that's why you recommended the Robostats! I see now what you mean... now that im full awake lol.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby Peter77 » Mon Jun 12, 2006 3:29 am

Robotstats works very well. I managed to install with the help of a translator online... is there not an english language I can install to it?
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Mon Jun 12, 2006 9:58 am

There is not much to translate, but yes would be a great addition.

I will look at it ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21382
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Mon Jun 12, 2006 2:31 pm

excuse me you said that i must add

Code: Select all
$op         = ( !empty($_REQUEST['op']) ) ? $_REQUEST['op'] : '';
$lang       = ( !empty($_REQUEST['lang']) ) ? $_REQUEST['lang'] : '';
$chemin     = ( !empty($_REQUEST['chemin']) ) ? $_REQUEST['chemin'] : '';
$url        = ( !empty($_REQUEST['url']) ) ? $_REQUEST['url'] : '';
.....


at the begining of the install.php file

you mean after <? or before <?

i added after <? like this

Code: Select all
<?
//error_reporting(0);
// ------------------------------------------------------------------------- //
// Original Author:   Olivier Duffez                               //
// Website: http://www.webrankinfo.com http://www.robotstats.com          //
// ------------------------------------------------------------------------- //
// Version 1.3: Pascal Le Boustouller                                //
// Website: http://www.go-cms.com                                   //
// ------------------------------------------------------------------------- //

$op         = ( !empty($_REQUEST['op']) ) ? $_REQUEST['op'] : '';
$lang       = ( !empty($_REQUEST['lang']) ) ? $_REQUEST['lang'] : '';
$chemin     = ( !empty($_REQUEST['chemin']) ) ? $_REQUEST['chemin'] : '';
$url        = ( !empty($_REQUEST['url']) ) ? $_REQUEST['url'] : '';
$s_db       = ( !empty($_REQUEST['s_db']) ) ? $_REQUEST['s_db'] : '';
$u_db       = ( !empty($_REQUEST['u_db']) ) ? $_REQUEST['u_db'] : '';
$mp_db      = ( !empty($_REQUEST['mp_db']) ) ? $_REQUEST['mp_db'] : '';
$n_db       = ( !empty($_REQUEST['n_db']) ) ? $_REQUEST['n_db'] : '';
$ok_install = ( !empty($_REQUEST['ok_install']) ) ? $_REQUEST['ok_install'] : '';
$tbl_robots = ( !empty($_REQUEST['tbl_robots']) ) ? $_REQUEST['tbl_robots'] : '';
$tbl_log    = ( !empty($_REQUEST['tbl_log']) ) ? $_REQUEST['tbl_log'] : '';
$tbl_url    = ( !empty($_REQUEST['tbl_url']) ) ? $_REQUEST['tbl_url'] : '';
$u_adm      = ( !empty($_REQUEST['u_adm']) ) ? $_REQUEST['u_adm'] : '';
$mp_adm     = ( !empty($_REQUEST['mp_adm']) ) ? $_REQUEST['mp_adm'] : '';
$ok_url     = ( !empty($_REQUEST['ok_url']) ) ? $_REQUEST['ok_url'] : '';
$ok_write   = ( !empty($_REQUEST['ok_write']) ) ? $_REQUEST['ok_write'] : '';

include_once('conf/rs_config.php');
include_once('include/functions.php');

echo '<HTML>';
echo '<HEAD>';
echo '<TITLE>Installation de Robotstats</TITLE>';
echo '</HEAD>';
echo '<link rel="stylesheet" type="text/css" media="all" href="style.css" />';
echo '<BODY>';
echo '<TABLE WIDTH=100% BORDER=0>
......


is it correct ?

i do something like this for header.php :roll:

another thing
this script only has french language pack
is there any translated pack to english
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Next

Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests