PDA

View Full Version : fake session id ?



tomek
10-01-2004, 11:54 AM
I just had the stupid (?) idea that I could add a fake session id to those links I don't want to be followed by search engines.

e.g. http://www.somesite.com/redirector/index.php?session_id=X34yA8We&url=[URL of page I want to redirect to]

I disallow the /redirector/ directory in my robots.txt.
And just to be sure to shy away the search engines I thought I could add a fake session id.

On the same page there are other links (in a search engine friendly manner). Do the search engines decide for each link individually if they should follow it?

Any thoughts on my idea?

James
10-01-2004, 01:38 PM
Based on the robots.txt file it should make them choose to not go to the entire directory. However, I believe it's a good measure if just to catch spam bots and ones that don't like the idea of following robots.txt (I'm sure there are a few out there) to include session ids in the URL. Good idea.

Anybody know of any cons to using this method?

tomek
10-01-2004, 01:54 PM
Based on the robots.txt file it should make them choose to not go to the entire directory.

there's nothing in there except the redirector script (index.php)

for the session_id one could use the time() function (php)

tomek
10-03-2004, 02:49 PM
no more comments? :confused:

emprivo
10-05-2004, 01:35 PM
no more comments? :confused:

On a related note, here is some PHP code that'll help you avoid the popular spam bots out there.... (put it as the first thing in your php)


/*==================================
Deny access to BAD bots
==================================*/
$agent = strtolower($HTTP_USER_AGENT);
if ((strstr($agent, "rip" )) ||
(strstr($agent, "internetseer" )) ||
(strstr($agent, "surveybot" )) ||
(strstr($agent, "webbandit" )) ||
(strstr($agent, "ninja" )) ||
(strstr($agent, "backdoor" )) ||
(strstr($agent, "linkwalker" )) ||
(strstr($agent, "grub" )) ||
(strstr($agent, "szukacz" )) ||
(strstr($agent, "htdig" )) ||
(strstr($agent, "icab" )) ||
(strstr($agent, "wget" )) ||
(strstr($agent, "reap" )) ||
(strstr($agent, "subtract" )) ||
(strstr($agent, "offline" )) ||
(strstr($agent, "xaldon" )) ||
(strstr($agent, "ecatch" )) ||
(strstr($agent, "msiecrawler" )) ||
(strstr($agent, "rocketwriter" )) ||
(strstr($agent, "httrack" )) ||
(strstr($agent, "track" )) ||
(strstr($agent, "teleport" )) ||
(strstr($agent, "webzip" )) ||
(strstr($agent, "extractor" )) ||
(strstr($agent, "lepor" )) ||
(strstr($agent, "copier" )) ||
(strstr($agent, "disco" )) ||
(strstr($agent, "capture" )) ||
(strstr($agent, "anarch" )) ||
(strstr($agent, "snagger" )) ||
(strstr($agent, "superbot" )) ||
(strstr($agent, "strip" )) ||
(strstr($agent, "block" )) ||
(strstr($agent, "saver" )) ||
(strstr($agent, "webhook" )) ||
(strstr($agent, "webdup" )) ||
(strstr($agent, "pavuk" )) ||
(strstr($agent, "interarchy" )) ||
(strstr($agent, "blackwidow" )) ||
(strstr($agent, "w3mir" )) ||
(strstr($agent, "schmozilla" )) ||
(strstr($agent, "cherry" )))
{
echo ("ACCESS DENIED/BANNED IP");
exit();
}