19.3. MnoGoSearch

MnoGoSearch is a Web site search engine, formerly known as UdmSearch. It works by following links on a Web site to build a database of keywords. Although you may use it by itself, it can be more convenient to access the engine directly from PHP.

You can find more information about MnoGoSearch at the home site: <http://www.mnogosearch.ru/>. Listing 19.12 demonstrates use of the MnoGoSearch functions.

Listing 19.12. Using MnoGoSearch
 <?php if(!isset($_REQUEST['query'])) { $_REQUEST['query'] = ''; } if(!isset($_REQUEST['page'])) { $_REQUEST['page'] = 0; } //connect to search engine $agent = udm_alloc_agent('mysql://user@localhost/mnogo/'); //only return English documents udm_add_search_limit($agent, UDM_LIMIT_LANG, 'en'); //ignore ...

Get Core PHP Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.