Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Start a session only for human browsers

A script you might find handy

9:52 am on Jun 10, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
votes: 0

After a few discussions on the propagation of SID's through the url when cookies are not turned on and how this can lead to duplicate content issues with some SE's I sat down and wrote this:

Maybe you'll find it useful or be able to improve on it....

/* Use this to start a session only if the UA is *not* at search engine
to avoid duplicate content issues with url propagation of SID's */

$searchengines=array("Google", "Fast", "Slurp", "Ink", "ia_archiver", "Atomz", "Scooter");
foreach($searchengines as $key => $val) {
if(strstr("$HTTP_USER_AGENT", $val)) {

if($is_search_engine==0) { // Not a search engine

/* You can put anything in here that needs to be
hidden from searchengines */

} else { // Is a search engine

/* Put anything you want only for searchengines in here */