- Code: Select all
// user agent
$agent = $_SERVER['HTTP_USER_AGENT'];
// read bots table
$sql = 'SELECT bot_name, bot_agent
FROM ' . BOTS_TABLE . '
WHERE bot_active = 1
ORDER BY bot_name ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// put all bot_agnet in array
$bot_array = array($row['bot_agent']);
while(list($id, $bot_name) = @each($bot_array) )
{
if(eregi($bot_name,$agent))
{
echo $row['bot_agent'];
}
}
}
output:
- Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3745: eregi(): REG_EPAREN
Googlebot
What is my error to if(eregi($bot_name,$agent)) ?? if use @eregi, not write any output.


