|
użytkowników online: 43
|
OPINIE UŻYTKOWNIKÓW
|
Po wysłaniu do Dariusza problemu jeszcze nie opisanego w poradach, odpowiedź pojawia się na stronach już po 24 godzinach. To jedna z najważniejszych zalet serwisu! Za około 100 złotych rocznie mam profesjonalnego i doświadczonego konsultanta od technologii internetowych! Polecam serwis z poradami każdemu webmasterowi, niezależnie od stażu pracy i umiejętności.
Paweł Kowalski
grupa hiperMEDIA.pl
|
|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
LXXIV. mnoGoSearch Functions
These functions allow you to access the mnoGoSearch (former
UdmSearch) free search engine. mnoGoSearch is a full-featured search
engine software for intranet and internet servers, distributed under the
GNU license. mnoGoSearch has a number of unique features, which makes it
appropriate for a wide range of applications from search within your
site to a specialized search system such as cooking recipes or newspaper
search, FTP archive search, news articles search, etc. It offers
full-text indexing and searching for HTML, PDF, and text documents.
mnoGoSearch consists of two parts. The first is an indexing mechanism
(indexer). The purpose of the indexer is to walk through HTTP, FTP, NEWS
servers or local files, recursively grabbing all the documents and
storing meta-data about that documents in a SQL database in a smart and
effective manner. After every document is referenced by its
corresponding URL, meta-data is collected by the indexer for later use
in a search process. The search is performed via Web interface. C, CGI,
PHP and Perl search front ends are included.
More information about mnoGoSearch can be found at
http://www.mnogosearch.org/.
Notatka:
To rozszerzenie zostało przeniesione do repozytorium
PECL i nie jest rozprowadzane z PHP od wersji 5.1.0.
Notatka: To rozszerzenie nie jest
dostępne na platformie Windows.
Download mnoGosearch from
http://www.mnogosearch.org/ and install it on your
system. You need at least version 3.1.10 of mnoGoSearch installed to use
these functions.
In order to have these functions available, you must compile PHP with
mnoGosearch support by using the
--with-mnogosearchoption. If
you use this option without specifying the path to mnoGosearch, PHP will
look for mnoGosearch under /usr/local/mnogosearch
path by default. If you installed mnoGosearch at a different location
you should specify it: --with-mnogosearch=DIR.
Notatka:
PHP contains built-in MySQL access library, which can be used to
access MySQL. It is known that mnoGoSearch is not compatible with
this built-in library and can work only with generic MySQL
libraries. Thus, if you use mnoGoSearch with MySQL, during PHP
configuration you have to indicate the directory of your MySQL
installation, that was used during mnoGoSearch configuration, i.e. for
example:
--with-mnogosearch --with-mysql=/usr.
To rozszerzenie nie definiuje posiada żadnych
dyrektyw konfiguracyjnych w pliku php.ini.
Poniższe stałe są zdefiniowane w tym rozszerzeniu i stają się dostępne, gdy
rozszerzenie jest dokompilowane do PHP, lub załadowane dynamicznie przy starcie.
User Contributed Notesbloodjazman at gmail dot com
22-Jun-2005 02:22
for win32 users, mnogosearch since version 3.2.x
support COM interface
for Reflection API of COM use Visual Studio .NET
-> Tools ..
-> OLE/COM object viewer
- > C:\Program Files\mnoGoSearch\searchcom.dll
simple code
<pre>
<?
define('MNOGOSEARCH_WIN32',
(strtoupper(substr(PHP_OS,0,3))=='WIN') && extension_loaded('COM'));
if (!MNOGOSEARCH_WIN32)
die('MnoGoSearch COM not loaded');
$agent = new COM('MnoGoSearch.GoSearch')
or die('Can\'t create COM object MnoGoSearch.GoSearch');
com_load_typelib('MnoGoSearch.GoSearch');
$agent->DBAddr = $params['DBAddr'];
$agent->SetCharset($params['Charset']);
$agent->SetCacheMode(true);
$q = 'q='. $query .'&np='. $_REQUEST['page'] .'&ps='. $_REQUEST['pg_size'] .'&m='. $_REQUEST['match'];
$q .= '&wm='. $_REQUEST['word_match'] .'&ul='. $_REQUEST['url_match']. '&wf='. $_REQUEST['where_find'];
$q .= '&typ='. $_REQUEST['content_type'] .'&s='. $_REQUEST['sortby'].'';
$result = $agent->Find($q);
if ($agent->ErrorCode>0 || !$result->Valid)
die('MnogoSearch win32 COM Error #'.$agent->ErrorCode.' - '.$agent->ErrorDescription);
$last=$result->LastDoc;
$first=$result->FirstDoc;
$hl_begin = '<span class="mnogosearch_hilight">';
$hl_end= '</span>';
$fetched_result=array();
$i=0;
for($row=$first;$row<=$last;$row++) {
$i=$row-$first;
$line = $result->Line($row);
$fetched_result[$i] = array(
'order'=>$line->Section('Order', $hl_begin, $hl_end),
'url'=> $line->Section('URL', $hl_begin, $hl_end),
'relevance'=>$line->Section('Score', $hl_begin, $hl_end),
'pagerank'=> $line->Section('Pop_Rank', $hl_begin, $hl_end),
'content_type'=> $line->Section('Content-Type', $hl_begin, $hl_end),
'content_length'=> $line->Section('Content-Length', $hl_begin, $hl_end),
'last_time'=> $line->Section('Last-Modified', $hl_begin, $hl_end),
'title'=> $line->Section('title', $hl_begin, $hl_end),
'body'=> $line->Section('body', $hl_begin, $hl_end),
'metadesc'=> $line->Section('meta.description', $hl_begin, $hl_end),
'metakeywords'=> $line->Section('meta.keywords', $hl_begin, $hl_end)
);
}
var_dump($fetched_result);
echo '<br/>search time : '.$result->SearchSeconds;
echo '<br/>words stats :'.$result->WordInfo;
echo '<br/>pg_count: '.$result->NPages;
echo '<br/>total_rows: '. $result->Count;
echo '<br/>first_doc: '.$result->FirstDoc;
echo '<br/>last_doc: '.$result->LastDoc;
echo '<br/>rows_in_page: '.$result->RowsOnPage;
?>
</pre>
m at manyone dot net
11-Jul-2002 06:23
I finally got PHP 4.2.1 to compile with mnoGoSearch 3.2.2 ; trick is to build the shared mnoGoSearch and not the static version (opposite from mnoGoSearch defaults), and not to use --disable-rpath in PHP.
brasnah-dev at brasnah dot com
27-Feb-2002 06:32
There is always a collisions for FTP name between PHP releease 4.2.0-dev and mnogosearch 3.2.3. So, first compile mnogosearch with --disable-ftp.
marten dot gustafsson at i_wont_tell_you dot com
12-Jun-2001 09:50
php-install at lists dot php dot net
25-Apr-2001 12:53
I have found that if you compile php with "--with-ftp and --with-mnogosearch=/dir" you must compile and build mnogosearch with "--disable-ftp" first. There are some naming conflicts between php's ftp libs and mno's ftp libs.
Hope this helps
|