<?php
$refer = !empty($_SERVER['HTTP_REFERER'] ? strtolower($_SERVER['HTTP_REFERER']): 'None')// вот тут и возникает ошибка Parse error: syntax error, unexpected '?', expecting ')' in
$searchEngines=array(
'images.google.'=>array('q','prev'),
'bing.com'=>'q',
'.alot.'=>'q',
'a993.com'=>'q1',
'abcsok.'=>'q',
'alltheweb.'=>'q',
'altavista.'=>'q',
'aol.'=>array('q','query','encquery'),
'aolsvc.'=>'query',
'avantfind.com'=>'keywords',
'bonvote.com'=>'search',
'bonweb.com'=>'search',
'comcast.net'=>'q',
'conduit.'=>'q',
'eniro.se'=>'search_word',
'excite.'=>'search',
'google.'=>array('q','as_q'),
'gogo.ru'=>'q',
'yandex.'=>array('text','query'),
'ya.ru'=>'text',
'hotbot.'=>'query',
'icerocket.com'=>'q',
'icq.com'=>'q',
'isheyka.com'=>'q',
'midco.net'=>'q',
'live.com'=>'q',
'msn.'=>'q',
'yahoo.'=>array('p','k'),
'search.'=>'q',
'kvasir.no'=>'q',
'myway.com'=>'searchfor',
'netscape.'=>array('q','query'),
'oceanfree.net'=>'as_q',
'qip.ru'=>'query',
'sweetim.com'=>'q',
'tut.by'=>'query',
'ukr.net'=>'search_query',
'search.oboz.ua'=>'k',
'search.www.infoseek.co.jp'=>'qt',
'.setooz.com'=>'query',
'toile.com'=>'q',
'vinden.nl'=>'q',
'.i.ua'=>'q',
'.mail.ru'=>array('q','tag'),
'.onru.ru'=>'q',
'aport.ru'=>'r',
'find.ru'=>'text',
'gde.ru'=>array('keywords','query','t','search_query','id'),
'go.km.ru'=>'sq',
'meta.ua'=>'q',
'metabot.ru'=>'st',
'nerus.ru'=>'query',
'nigma.ru'=>array('s','pq'),
'nova.rambler.ru'=>'query',
'poisk.ru'=>'text',
'protonet.ru'=>'q',
'rambler.ru'=>'words',
'tyndex.ru'=>'pnam',
'webalta.ru'=>'q',
'exactseek.com'=>array('q','query'),
'lycos.' => 'query',
'ask.' => 'q',
'cnn.' => 'query',
'looksmart.' => 'qt',
'about.' => 'terms',
'mamma.' => 'query',
'gigablast.' => 'q',
'voila.' => 'rdata',
'virgilio.' => 'qs',
'baidu.' => 'wd',
'alice.' => 'qs',
'najdi.' => 'q',
'club-internet.' => 'q',
'mama.' => 'query',
'seznam.' => 'q',
'netsprint.' => 'q',
'szukacz.' => 'q',
'yam.' => 'k',
'pchome.' => 'q',
);
$tmp = parse_url(urldecode(trim($refer)));
$site = $tmp['host'];
$str = $tmp['query'];
parse_str($str,$arr);
foreach ($searchEngines as $key=>$value)
{
if(substr_count($site, $key))
{
foreach ($arr as $k=>$v)
{
if(is_array($value))
{
if(in_array ("$k",$value))
{$s_word = $v; break;}
}
elseif("$k" == $value) {$s_word = $v; break;}
else {$s_word = "None"; break;}
}
break;
}
}
?>
_____________
Лучший хостинг