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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.