Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prevent spider sessions


Vger

Recommended Posts

Posted

Hi,

 

If I turn on the 'prevent spider sessions' feature I need to know first if the list of spiders in the file spiders.txt is the list of allowed spiders unaffected by turning on this feature, or if it is the list of known spiders to be disallowed under this feature. Does anyone know the answer to this question.

 

Many Thanks - Vger

Posted

Okay, so here I am going through the forum, trying to help others out with problems - and no one's posting an answer to this. Someone must have the answer, surely?

 

I have checked the wiki documentation and run various searches and can't find a simple answer to this simple question anywhere.

 

Vger

Posted

I think you're right on you're second point, the list in spiders.txt is the one that doesn't give SID's out. I'll have to dig more to find out for sure though... :D

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Posted

App_top:

 

// start the session
 $session_started = false;
 if (SESSION_FORCE_COOKIE_USE == 'True') {
   tep_setcookie('www.nabcomdiamonds.com cookie', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);

   if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
     tep_session_start();
  // user_tracking modifications 
  if (!$referer_url) { 
   $referer_url = $HTTP_SERVER_VARS['HTTP_REFERER']; 
       if ($referer_url) { 
           tep_session_register('referer_url'); 
       } 
   }  
     $session_started = true;
   }
 } elseif (SESSION_BLOCK_SPIDERS == 'True') {
   $user_agent = strtolower(getenv('HTTP_USER_AGENT'));
   $spider_flag = false;

   if (tep_not_null($user_agent)) {
     $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');

     for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
       if (tep_not_null($spiders[$i])) {
         if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
           $spider_flag = true;
           break;
         }
       }
     }
   }

   if ($spider_flag == false) {
     tep_session_start();
     $session_started = true;
   }
 } else {
   tep_session_start();
   $session_started = true;
 }

 

 

If the spider session is true, it doesn't start a session id.

 

Sorry I couldn't provide line numbers for you...

 

HTH

Noel

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...