homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Start a session only for human browsers
A script you might find handy

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

Msg#: 464 posted 9:52 am on Jun 10, 2002 (gmt 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 */




Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved