Connais tu un mod stable qui permet de signaler lorsqu'un bot est présent sur le forum ?
Merci à toi
Modérateur: Modérateurs

exit;include("./robotstats/robotstats.inc.php");



$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'] : '';
/**
* 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 
L'installation est maintenant terminée, il vous reste 3 choses à faire :
3) Insérer dans toutes vos pages le code ci-dessous afin que le passage des robots soit enregistré
include("/kunden/homepages/9/d174874601/htdocs/forum/robotstats/robotstats.inc.php")Warning: main(/forum/robotstats/robotstats.inc.php) [function.main]: failed to open stream: No such file or directory in /homepages/9/d174874601/htdocs/forum/includes/page_tail.php on line 111
Warning: main() [function.include]: Failed opening '/forum/robotstats/robotstats.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/9/d174874601/htdocs/forum/includes/page_tail.php on line 111
Elglobo a écrit:Le code à rajouter au niveau de phpbb est le suivant :
Ouvrir includes/page_tail.php :
Chercher :
- Code: Tout sélectionner
exit;
Ajouter avant :
- Code: Tout sélectionner
include("./robotstats/robotstats.inc.php");
Si vous avez installez robostats à la racine de phpbb, sinon modifiez juste le chemin.
Bonne journée



dcz a écrit:Personnellement et comme ce script n'est pas tout à fait au top, je pense qu'il est sage de fermer totalement l'accès au dossier robotstats/ avec un .htpasswd, c'est pas trop la peine non plus que ces pages soient référencées, des ressources serveur pour pas grand choses, car au final, c'est infos te concerne toi au départ, et ne sont pas forcement bonnes à donner en pâture à tous.
Mais c'est un point de vu personnel.
Pour cela, il te faudra aussi commenter la dernière ligne de robotstats.inc.php, celle qui affiche justement l'image lien, enfin si tu fermes le dossier
++

Retourner vers Le Forum phpBB2
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 33 invités