#===================================================================== # access cgi 検索サービス解析ライブラリ search.pl (2002/12/24) #===================================================================== # 検索キーワード情報解析処理 sub search_service { my ($ref) = @_; my ($refq, $refs); # Google Inc. 216.239.32.0 - 216.239.63.255 # Google cache if ($ref =~ /\/216\.239\.[3-6]\d\.100\/search.*?(\?|\&)(q|query|as_q)=(cache:.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'Google'; } # Google elsif ($ref =~ /google\..*?(\?|\&)(q|query|as_q)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'Google'; } # Yahoo!/Page elsif ($ref =~ /google\.yahoo\..*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo/Page'; } elsif ($ref =~ /websearch\.yahoo\..*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo/Page'; } # Yahoo!/Site elsif ($ref =~ /search\.yahoo\.co\.jp\/.*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo/Site'; } # Yahoo!/Site elsif ($ref =~ /yahoo\..*?\/search\/.*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo/Site'; } # Yahoo!/Page elsif ($ref =~ /yahoo\..*?\/bin\/.*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo/Page'; } # Yahoo! elsif ($ref =~ /yahoo\..*?(\?|\&)p=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'Yahoo'; } # goo elsif ($ref =~ /goo\..*?(\?|\&)MT=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'goo'; } # infoseek elsif ($ref =~ /infoseek\..*?(\?|\&)qt=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'infoseek'; } # Excite elsif ($ref =~ /excite\..*?(\?|\&)(s|search)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'Excite'; } # LYCOS elsif ($ref =~ /lycos\..*?(\?|\&)(q|query)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'LYCOS'; } # FreshEye elsif ($ref =~ /fresheye\..*?(\?|\&)kw=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'FreshEye'; } # All The Web elsif ($ref =~ /alltheweb\..*?(\?|\&)(q|query)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'AllTheWeb'; } # AltaVista elsif ($ref =~ /altavista\..*?(\?|\&)q=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'AltaVista'; } # NAVER elsif ($ref =~ /naver\..*?(\?|\&)query=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'NAVER'; } # ODIN elsif ($ref =~ /odin\..*?(\?|\&)key=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'ODIN'; } # ISIZE elsif ($ref =~ /isize\..*?(\?|\&)QueryString=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'ISIZE'; } # MSN Search elsif ($ref =~ /search\.msn\..*?(\?|\&)(q|MT)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'MSN'; } # JOY elsif ($ref =~ /search\.netjoy\..*?(\?|\&)key=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'JOY'; } # kensaku.jp elsif ($ref =~ /kensaku\..*?search\.cgi.*?(\?|\&)key=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'kensaku'; } # @search elsif ($ref =~ /nifty\..*?search\.cgi.*?(\?|\&)Text=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = '@search'; } # Attayo! elsif ($ref =~ /search\.biglobe\..*?(\?|\&)(q|op_q)=(.*?)(\&[^\&]+?=|$)/i) { $refq = $3; $refs = 'Attayo'; } # InfoNavigator elsif ($ref =~ /para\.cab\.infoweb\..*?(\?|\&)Querystring=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'InfoNavi'; } # TOCC/Search elsif ($ref =~ /tocc\..*?(\?|\&)QRY=(.*?)(\&[^\&]+?=|$)/i) { $refq = $2; $refs = 'TOCC'; } return ($refq, $refs); } #===================================================================== # 検索サービス・リンク元情報置換設定 %searchsite = ( 'Google' , 'http://www.google.co.jp/' , 'Yahoo/Page' , 'http://www.yahoo.co.jp/docs/search.html' , 'Yahoo/Site' , 'http://www.yahoo.co.jp/' , 'Yahoo' , 'http://www.yahoo.com/' , 'goo' , 'http://www.goo.ne.jp/' , 'infoseek' , 'http://www.infoseek.co.jp/' , 'Excite' , 'http://www.excite.co.jp/' , 'LYCOS' , 'http://www.lycos.co.jp/' , 'FreshEye' , 'http://www.fresheye.com/' , 'AllTheWeb' , 'http://www.alltheweb.com/' , 'AltaVista' , 'http://altavista.com/' , 'NAVER' , 'http://www.naver.co.jp/' , 'ODIN' , 'http://odin.ingrid.org/' , 'ISIZE' , 'http://www.isize.com/' , 'MSN' , 'http://search.msn.co.jp/' , 'JOY' , 'http://www.joyjoy.com/JOY.html' , 'kensaku' , 'http://kensaku.jp/' , '@search' , 'http://www.nifty.com/search/' , 'Attayo' , 'http://search.biglobe.ne.jp/' , 'InfoNavi' , 'http://infonavi.infoweb.ne.jp/' , 'TOCC' , 'http://www.tocc.co.jp/search/' , ); #===================================================================== # 検索サービス・リンク元表示置換設定 %searchtitle = ( 'http://www.google.co.jp/' ,'[検索] Google' , 'http://www.yahoo.co.jp/docs/search.html' ,'[検索] Yahoo!/Page' , 'http://www.yahoo.co.jp/' ,'[検索] Yahoo!/Site' , 'http://www.yahoo.com/' ,'[検索] Yahoo!' , 'http://www.goo.ne.jp/' ,'[検索] goo' , 'http://www.infoseek.co.jp/' ,'[検索] infoseek' , 'http://www.excite.co.jp/' ,'[検索] Excite' , 'http://www.lycos.co.jp/' ,'[検索] LYCOS' , 'http://www.fresheye.com/' ,'[検索] FreshEye' , 'http://www.alltheweb.com/' ,'[検索] All The Web' , 'http://altavista.com/' ,'[検索] AltaVista' , 'http://www.naver.co.jp/' ,'[検索] NAVER' , 'http://odin.ingrid.org/' ,'[検索] ODIN' , 'http://www.isize.com/' ,'[検索] ISIZE' , 'http://search.msn.co.jp/' ,'[検索] MSN Search' , 'http://www.joyjoy.com/JOY.html' ,'[検索] J.O.Y.' , 'http://kensaku.jp/' ,'[検索] kensaku.jp' , 'http://www.nifty.com/search/' ,'[検索] @search' , 'http://search.biglobe.ne.jp/' ,'[検索] Attayo!' , 'http://infonavi.infoweb.ne.jp/' ,'[検索] InfoNavigator' , 'http://www.tocc.co.jp/search/' ,'[検索] TOCC/Search' , ); #===================================================================== 1; # return