cotonti.com : Forum closed and Google bot https://www.cotonti.com Last topic posts Cotonti en Mon, 14 Sep 2026 18:03:30 -0000 Trustmaster
/* ====================
[BEGIN_SED_EXTPLUGIN]
Code=fclose
Part=header
File=fclose.header
Hooks=header.first
Tags=
Order=10
[END_SED_EXTPLUGIN]
==================== */
if (!defined('SED_CODE')) { die("Wrong URL."); }

if ($usr['id']==0 || !preg_match('#(google|yahoo|msn)#i', $_SERVER['HTTP_USER_AGENT']))
{
  header("Location: message.php?msg=930");
}
]]>
Tue, 21 Apr 2009 21:21:48 -0000
Lombi Tue, 21 Apr 2009 19:45:53 -0000 MecTruy
incorrect code , does not work..

preg_match('#(google|yahoo|msn)#i', $_SERVER['HTTP_USER_AGENT'], $bot_ara);
if ($usr['id']==0 or !$bot_ara[1])
{
header("Location: message.php?msg=930");
}
]]>
Tue, 21 Apr 2009 19:39:02 -0000
Lombi
But if you still want to do it, i'd suggest just adding one extra logic block into that php file, if the agent contains the word 'googlebot'. That should solve it.]]>
Tue, 21 Apr 2009 19:31:59 -0000
MecTruy
Google bot ?


sample code
if ($usr['id']<1) 
{ 
header("Location: message.php?msg=930"); 
}
]]>
Fri, 17 Apr 2009 16:42:34 -0000