View Single Post
Old 01-22-2004, 12:49 PM   #13
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Assuming version 1.8.0, use the robot_functions.php file attached in this thread.

This is untested, but in the robot_funtions.php file there are two places to edit.

First, replace the following:
PHP Code:
if (PHPDIG_SESSID_REMOVE) {
    
$eval ereg_replace(PHPDIG_SESSID_VAR.'=[a-z0-9]*','',$eval);
    
$eval str_replace("&&","&",$eval);
    
$eval eregi_replace("[?][&]","?",$eval);
    
$eval eregi_replace("&$","",$eval);

with the following:
PHP Code:
if (PHPDIG_SESSID_REMOVE) {
    
$my_test_comma stristr(PHPDIG_SESSID_VAR,",");
    if (
$my_test_comma !== FALSE) {
        
$my_test_comma_array explode(",",PHPDIG_SESSID_VAR);
        
$my_test_comma_count count($my_test_comma_array);
        for (
$i=0$i<$my_test_comma_count$i++) {
            
$eval ereg_replace($my_test_comma_array[$i].'=[a-z0-9]*','',$eval);
            
$eval str_replace("&amp;amp;&amp;amp;","&amp;amp;",$eval);
            
$eval str_replace("?&amp;amp;","?",$eval);
            
$eval eregi_replace("&amp;amp;$","",$eval);
        }
    }
    else {
        
$eval ereg_replace(PHPDIG_SESSID_VAR.'=[a-z0-9]*','',$eval);
        
$eval str_replace("&amp;amp;&amp;amp;","&amp;amp;",$eval);
        
$eval str_replace("?&amp;amp;","?",$eval);
        
$eval eregi_replace("&amp;amp;$","",$eval);
    }

Second, replace the following:
PHP Code:
if (PHPDIG_SESSID_REMOVE) {
    
$file ereg_replace(PHPDIG_SESSID_VAR.'=[a-z0-9]*','',$file);
    
$file str_replace("&&","&",$file);
    
$file eregi_replace("[?][&]","?",$file);
    
$file eregi_replace("&$","",$file);

with the following:
PHP Code:
if (PHPDIG_SESSID_REMOVE) {
    
$my_test_comma stristr(PHPDIG_SESSID_VAR,",");
    if (
$my_test_comma !== FALSE) {
        
$my_test_comma_array explode(",",PHPDIG_SESSID_VAR);
        
$my_test_comma_count count($my_test_comma_array);
        for (
$i=0$i<$my_test_comma_count$i++) {
            
$file ereg_replace($my_test_comma_array[$i].'=[a-z0-9]*','',$file);
            
$file str_replace("&amp;amp;&amp;amp;","&amp;amp;",$file);
            
$file str_replace("?&amp;amp;","?",$file);
            
$file eregi_replace("&amp;amp;$","",$file);
        }
    }
    else {
        
$file ereg_replace(PHPDIG_SESSID_VAR.'=[a-z0-9]*','',$file);
        
$file str_replace("&amp;amp;&amp;amp;","&amp;amp;",$file);
        
$file str_replace("?&amp;amp;","?",$file);
        
$file eregi_replace("&amp;amp;$","",$file);
    }

Then use define('PHPDIG_SESSID_VAR','ID1,ID2,ID3'); in the config.php file, separating each session ID by a comma if there is more than one.

Of course, you could define such a function to avoid the repeat in code. In any case, remember to remove any "word" wrapping in the above code.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote