Browse Source

is_search_request in php and reorganizing

master
Duke Leto 16 years ago
parent
commit
c50cb3aef6
  1. 0
      perl_lib/Leto/Util/Web.pm
  2. 0
      perl_lib/t/Web.t
  3. 15
      php_lib/web_util.php

0
lib/Leto/Util/Web.pm → perl_lib/Leto/Util/Web.pm

0
lib/t/Web.t → perl_lib/t/Web.t

15
php_lib/web_util.php

@ -0,0 +1,15 @@
function is_search_request() {
$r = $_SERVER['HTTP_REFERER'];
$engines = array('/search?',
'images.google.',
'search.yahoo.com',
'del.icio.us/search',
'msn.com',
'live.com',
);
foreach ($engine as $eng) {
if (strpos($r,$eng) !== false)
return true;
}
return false;
}
Loading…
Cancel
Save