Forum Moderators: open

Message Too Old, No Replies

php is no good?

adding php sites to search engines

         

chetas

12:45 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



please delete. created by accident

ps i welcome myself towebmaster forum

[update again] dont delete. useful now!

[edited by: chetas at 1:44 pm (utc) on June 9, 2003]

jaski

12:54 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



The trick is to not start session if user agent is a good robot

a simple way would be

if(is_bot($HTTP_USER_AGENT))
{
session_start();
}

where is_bot is a function which returns true or false depending on if its a bot or not.

That is a custom written function .. and should be some thing like (just off the top of my head)

function is_bot($user_agent)
{
if(ereg("bot",$user_agent))
{
return true;
}
elseif("scooter",$user_agent)
{
return true;
}
elseif{ add more } //more blocks like above
else
{
return false;
}

}

chetas

12:57 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



hi thanks for your help!

by not starting a sesssion, what will that mean? most my php files get their data from the database.. and the actualy files dont have that much useful information

jaski

1:03 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



It has nothing to do with mysql .. that is no problem at all .. you may read more about sessions here .. [php.net...]

if I remember it right .. you wanted to get rid of sessionid from url?

chetas

1:42 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



hi, just want to get all the products in my store indexed.

would you be able to help me write a custom file... im a bit clueless. and their arent no downsides are there?

cayleyv

10:28 pm on Jun 9, 2003 (gmt 0)

10+ Year Member



thanks jaski, this is an excellent script to help sites be spidered! I wonder if google has run into this, and recognizes it as non-cloaking.

jaski

5:12 am on Jun 10, 2003 (gmt 0)

10+ Year Member



oh google loves *this particular* cloaking.

[webmasterworld.com...]

HTH
Jaski

jaski

5:16 am on Jun 10, 2003 (gmt 0)

10+ Year Member



Just to correct a mistake. In the script I gave above .. it should be if(!(is_bot($HTTP_USER_AGENT)) .. "!" is missing .. and it becomes exact opposite of what was intended ..

ie. session should not be started if its a bot ..