Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

bbclone filters!!!

Aloittaja Gandalf, maaliskuu 04, 2005, 02:34:35 IP

« edellinen - seuraava »

Gandalf

hello,
i think you already know what is the bbclone, it's for statistics ( http://www.bbclone.de )

i have put the below code in the Index.php just under the if-clause for maintaince

//bclone start, By Wael
$bbclonepagename = "index.php?";
foreach($_REQUEST as $requestname => $requestvalue)
       {
        //filtering the $requests and geeting only the part where the request name is
        //topic, board or action
//if( $requestname != 'topic' && $requestname != 'action' && $requestname == 'board' )
if($requestname == 'PHPSESSID' || $requestname == 'SMFCookie10' || $requestname == 'siemens-mobiles_org' || $requestname == 'sesc' || $requestname == 'sc' )
continue;

if( $requestname == 'passwrd' || $requestname == 'oldpasswrd' || $requestname == 'passwrd2' )
$requestvalue="_HIDDEN_";
$bbclonepagename .= $requestname . "=" . $requestvalue . "&";
}
$bbclonepagename = substr($bbclonepagename,0,-1);

define("_BBC_PAGE_NAME", $bbclonepagename);
define("_BBCLONE_DIR", "../bbclone/");
define("COUNTER", _BBCLONE_DIR . "mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
    //bbclone end

now i'm filtering the requests to include important things
but i still have the sesc and sa variables, how to remove the sesc=.... and sa=.... from the url?

is it by the variable $subActions[$_REQUEST['sesc']]
i mean

if(stristr( $requestvalue, $subActions[$_REQUEST['sesc']) )
{
     $requestvalue = str_replace("sesc=$subActions[$_REQUEST['sesc']", "", $requestvalue);
}


BTW what are the other unimportant things like sesc and sc
Siemens-mobiles.org Visit it and you won't regret it :D

[Unknown]

They aren't unimportant; sesc and sc are used for verification and validation: in other words, security.

You could filter them out the same way you do PHPSESSID, I assume.

-[Unknown]

Advertisement: