cotonti.com : Forum closed and Google bot https://www.cotonti.com Останні повідомлення в темі Cotonti en Wed, 22 Jul 2026 00:00:44 -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");
}
]]>
Вт, 21 Кві 2009 21:21:48 -0000
Lombi Вт, 21 Кві 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");
}
]]>
Вт, 21 Кві 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.]]>
Вт, 21 Кві 2009 19:31:59 -0000
MecTruy
Google bot ?


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