View Single Post
Old 02-07-2005, 11:01 AM   #6 (permalink)
bendsley
Professional Loafer
 
bendsley's Avatar
 
Location: texas
Try this:
Also make sure that the file you edit is backed up first!!

Links:
http://www.phpbbfetchall.com/phpBB2/about1816.html
http://www.webmasterworld.com/forum103/297.htm


Quote:
# ---[ OPEN ]

/includes/sessions.php

# ---[ FIND ]

function append_sid($url, $non_html_amp = false)
{
global $SID;

if (!empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}

return $url;
}

# ---[ CHANGE TO ]

function append_sid($url, $non_html_amp = false)
{
global $SID, $HTTP_SERVER_VARS;

$_this_agent = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];

if (preg_match("/google/i", $_this_agent)) {
return $url;
}

if (preg_match("/slurp/i", $_this_agent)) {
return $url;
}

if (preg_match("/archive/i", $_this_agent)) {
return $url;
}

if (preg_match("/crawl/i", $_this_agent)) {
return $url;
}

if (preg_match("/validator/i", $_this_agent)) {
return $url;
}

if (preg_match("/robot/i", $_this_agent)) {
return $url;
}

if (preg_match("/check/i", $_this_agent)) {
return $url;
}

if (!empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}

return $url;
}

# ---[ SAVE & CLOSE ]
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane."
bendsley is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46