Skip to content

Instantly share code, notes, and snippets.

@ntulip
Created November 24, 2009 22:16
Show Gist options
  • Save ntulip/242293 to your computer and use it in GitHub Desktop.
Save ntulip/242293 to your computer and use it in GitHub Desktop.
$engines = array(
'Google' => array(
'host_pattern_sql' => 'http://www.google.%',
'host_pattern_preg' => '!google(\\.[a-z]+)+$!',
'path_pattern' => '!^/(search|url)!',
'query_variable' => 'q',
),
'Yahoo!' => array(
'host_pattern_sql' => 'http://%search.yahoo.com/%',
'host_pattern_preg' => '!([a-z]+\\.)*search.yahoo.com!',
'path_pattern' => '!^/search!',
'query_variable' => 'p',
),
'Live search' => array(
'host_pattern_sql' => 'http://search.%.com/results.aspx%',
'host_pattern_preg' => '!search\\.(live|msn)\\.com!',
'path_pattern' => '!^/results.aspx!',
'query_variable' => 'q',
),
'Yandex' => array(
'host_pattern_sql' => 'http://%yandex.ru/yandsearch%',
'host_pattern_preg' => '!yandex.ru!',
'path_pattern' => '!^/yandsearch!',
'query_variable' => 'text',
),
'Rambler' => array(
'host_pattern_sql' => 'http://www.rambler.ru/srch%',
'host_pattern_preg' => '!rambler.ru!',
'path_pattern' => '!^/srch!',
'query_variable' => 'words',
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment