Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
URI::ParseSearchStringUser Contributed Perl DocumentaURI::ParseSearchString(3)

       URI::ParseSearchString -	parse search engine referrer URLs and extract
       keywords	used

       Version 3.51  (Diablo 3 edition)

	 use URI::ParseSearchString ;

	 my $uparse = new URI::ParseSearchString();
	 my $ref    = '';

	 my $query_terms = $uparse->se_term( $ref );
	 my $canonical	 = $uparse->se_name( $ref );
	 my $hostname	 = $uparse->se_host( $ref );

	 Creates a new instance	object of the module.

	 my $uparse = new URI::ParseSearchString() ;

       This module provides a simple function to parse and extract search
       engine query strings. It	was designed and tested	having Apache referrer
       logs in mind. It	can be used for	a wide number of purposes, including
       tracking	down what keywords people use on popular search	engines	before
       they land on a site. Although a number of existing modules and scripts
       exist for this purpose, the majority of them are	either outdated	using
       obsolete	search strings associated with each engine.

       The default function exported is	"parse_search_string" which accepts an
       unquoted	referrer string	as input and returns the search	engine query
       contained within. It currently works with both escaped and un-escaped
       queries and will	translate the search terms before returning them in
       the latter case.	The function returns undef in all other	cases and

       for example:

	  my $ref   = '';
	  my $terms =
	     $uparse->parse_search_string( $ref	);

       would return 'a simple test'


	  my $ref   = '';
	  my $terms =
	     $uparse->parse_search_string( $ref	);

       would return 'a more! complex_ search$'

       Same as parse_search_string().

       Returns a list with the hostname	of the search engine as	the first
       element and the canonical name as the second element.

	 my $ref = '';
	 my ($hostname,	$canonical) = $uparse->findEngine( $ref	) ;

       This will return	'' as	the search engine hostname and
       'Google'	as the name.  This function will return	undef on error.

       Wrapper around findEngine - returns just	the hostname.  This function
       will return undef on error.

       Wrapper around findEngine - returns just	the canonical name; This
       function	will return undef on error.

       Currently supported search engines include: Sproose, Google Namibia,
       Google Ivory Coast, Google Oman,	Technorati, Google Ecuador, Google
       Norfolk Island, Mahalo, Google UK, Yahoo! UK, Google Micronesia,	Google
       Bahrain,	Basta Clicar, Giga Busca, Google Greece, Google	Belgium,
       Google Egypt, Google Chile, Godado (IT),	Google Australia, Google
       Uruguay,	Google India, Google Taiwan, Google Ukraine, Google US,	Terra
       ES, Tesco Search, Megasearching,	SAPO videos, Google Nepal, Google
       Israel, Google US Virgin	Islands, Google	Hungary, Google	San Marino,
       Google Croatia, Google dot jobs,	Google Panama, Google Malaysia,
       Internetica, Google Brunei Darussalam, Google Denmark, Google Pakistan,
       Google Solomon Islands, Google dot biz, Google Lesotho, IceRocket,
       Google Greenland, Fireball DE, Rtp, Google Portugal, Google Samoa,
       Google Kazakhstan, Google Blogsearch, Google Thailand, Google, Google
       Antiqua and Barbuda, Google Germany, Google Moldova, Google Zambia,
       Google Greece, Google Sri Lanka,	Google Ireland,	Google Austria,	Google
       Peru, Google Guatemala, ICQ dot com, AOL	UK, Google Guyana, In GR,
       Google dot info,	MyWay, Pathfinder GR, Google Costa Rica, KataTudo,
       Google Jamaica, Google Vietnam, Google Morocco, Google Gambia, Google
       Singapore, Google Mauritius, Altavista, Google Afghanistan, Google Cote
       dIvoire,	Google Kazakhstan, Google Czech	Rep, Phantis GR, Google
       Bahamas,	Google United Arab Emirates, Google East Timor,	Ozu ES,	Google
       Venezuela, Google Puerto	Rico, Google Armenia, Google Croatia, Google
       Botswana, Google	Tuvalu,	Ask UK,	Google Singapore, Mirago UK, Google
       Greenland, MSN Arabia, Google Nauru, Publico, Robby GR, Minas Planet,
       Pesquisa	Iol, Google Romania, Google South Korea, Google	Jersey,
       Netscape, Busca Aqui, Google Bulgaria, Google Uzbekistan, Tiscali UK,
       Ithaki, CadAa, Lycos IT,	Google Suriname, Excite	IT, Google Hong	Kong,
       Kataweb IT, Google Burundi, Click Gratis, Google	Vietnam, MSN,, Google	Honduras, Google Trinidad and Tobago, Google Uganda,
       XL, Jornal Noticias, Google Cook	Islands, Google	Japan, Google Ecuador,
       Google Ghana, Google Guadeloupe,	Google Libya, Google Kenya,
       Fastbrowsersearch, Aeiou, Google	Niue, Jornal Record, HotBot, Google
       Honduras, Google	Georgia, Google	Fiji, Google Philipines, BBC Search,
       Google, Google Laos, Soso, AltaVista Brasil, Lycos UK, SAPO fotos, Ask
       dot com,	Google Netherlands, Google Philipines, Google Trinidad and
       Tobago, Google Turkey, AllTheWeb, Google	Japan, Google Argentina,
       Google Vanuatu, Blueyonder, Google Greenland, Google Samoa, Google
       Georgia,	Google Slovakia, Google	Sri Lanka, Pesquisa SAPO, Google
       Latvia, Google Latvia, Correio Manha, Terra Busca, Google El Savador,
       Google Cambodia,	Google Mauritius, Google China,	AOL Search, Google
       Tokelau,	Google Tonga, Correio da Manha,	Radar UOL, Google Jordan,
       Godado, Google Jordan, Google Pitcairn Islands, Categorico IT, Google
       Morocco,	Google Dominican Rep, Google France, Abacho, Google
       Azerbaijan, Google Andorra, Google Belize, Google Paraguay, Simpatico
       IT, Google Ethiopia, Google Uganda, Google Poland, Google Bolivia,
       Google Hungary, Google Russia, Diario Noticias, Google Puerto Rico,
       Google Montserrat, Yahoo! Japan,	Google Seychelles, Mamma, Google
       Pitcairn	Islands, Google	 South Africa, Paglo, Google Malta, Google
       Azerbaijan, Google New Zeland, Google China, Google Norway, Google
       Bosnia and Herzegovina, Google Indonesia, SpeedyBusca, Entrada, Google
       Anguilla, Google	Rep of Congo, Google Dominica, Google Finland,
       Altavista UK, Google Guyana, MSN	UK, Yahoo Answers, Google British
       Virgin Islands, Google Guadeloupe, Google Lithuania, Google Antiqua and
       Barbuda,	Google Bahamas,	Google Malawi, MSN Prodigy, Bing, Google
       Bolivia,	Google Djubouti, Google	Uzbekistan, Fastweb IT,	Google
       Tajikistan, Virgin Search, Google Nigeria, Yahoo	Japan, Pesquisa	Clix,
       Google Grenada, Google Haiti, Google American Samoa, Google Pakistan,
       Google Cocos Islands, Google Hong Kong, NTLWorld, ilMotore, Google
       Belize, Google Guernsey,	Google Sweden, Google Anguilla,	Google
       Bangladesh, Google Isle of Man, Google Guernsey,	Google Kyrgyzstan,
       Google Dem Rep of Congo,	Google Malawi, Orange Search, Google
       Seychelles, Google Guyana, Google Gibraltar, oogle Italy, Google
       Kiribati, TheSpider IT, Google Nicaragua, Google	Russia,	Google
       Venezuela, Google Poland, Google	Brazil,	Google Senegal,	Conduit,
       Lycos, Google Isle of Man,, Google Italy, Libero IT, Google
       Canada, Google Nauru, Google Liechtenstein, Google Afghanistan, Cuil,
       Google Zimbabwe,	Google Mauritius, Orange ES, Google Burundi, Google
       Portugal, ACBusca, Bem Rapido, Atalho Certo, Excite, Clusty, Yahoo
       Brazil, My Web Search, Google Spain, Google Uzbekistan, Google, Google
       Mexico, T-Online, Google	dot mobi, Google Luxembourg, Google Austria,
       Yahoo!, Google Kiribati,	Sweetim, Vai Busca, Google Mongolia, Google
       Saudi Arabia, Google dot	net, Google Maldives, Google Trinidad and
       Tobago, Google Jersey, Feedster,	Google Turkmenistan, Google
       Switzerland, Google Norfolk Island, Suche DE, Google Malawi, Google
       Rwanda, Lycos ES, Google	Burundi, Google	French Guiana, Google
       Kyrgyzstan, Google Saint	Helena,	VirginMedia, Google Iceland, SAPO
       sabores,	Google India, Google Cuba, Google US Virgin Islands, Google
       Taiwan, Google Sao Tome,	Google Slovenia, Starware, Google Estonia,
       Conduit,	Yahoo India, Rediff, Guruji

       Spiros Denaxas, "<s.denaxas at>"

       The source code can be found on github

       This is my first	CPAN module so I encourage you to send all comments,
       especially bad, to my email address.

       This could not have been	possible without the support of	my co-workers
       at	- the easiest way of finding UK	property.

       For more	information, you could also visit my blog:

       Copyright 2011 Spiros Denaxas, all rights reserved.

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.32.0			  2013-05-13	     URI::ParseSearchString(3)


Want to link to this manual page? Use this URL:

home | help