summaryrefslogtreecommitdiff
path: root/ext/mnogosearch
diff options
context:
space:
mode:
authorSergey Kartashoff <gluke@php.net>2001-12-01 14:12:27 +0000
committerSergey Kartashoff <gluke@php.net>2001-12-01 14:12:27 +0000
commit16344800b21bf6e14ed2930b5c813e8ffee2008a (patch)
tree32f321d5ed5bd451e5c43796255a695da9a87a73 /ext/mnogosearch
parentf70e998794f5d3f9a0681b219f3748c49b867ed1 (diff)
downloadphp-git-16344800b21bf6e14ed2930b5c813e8ffee2008a.tar.gz
- mnoGoSearch module usage example (searchlite) updated to support
StoreDoc stuff.
Diffstat (limited to 'ext/mnogosearch')
-rw-r--r--ext/mnogosearch/index.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/ext/mnogosearch/index.php b/ext/mnogosearch/index.php
index a3d755caeb..0d8f3df9f6 100644
--- a/ext/mnogosearch/index.php
+++ b/ext/mnogosearch/index.php
@@ -5,7 +5,7 @@
$Id$
*/
-/* mnoGoSearch-php-lite v.1.1
+/* mnoGoSearch-php-lite v.1.2
* for mnoGoSearch ( formely known as UdmSearch ) free web search engine
* (C) 2001 by Sergey Kartashoff <gluke@mail.ru>,
* mnoGoSearch Developers Team <devel@mnogosearch.org>
@@ -46,6 +46,8 @@ $stopwordtable_arr[]='stopword';
$minwordlength=1;
$maxwordlength=32;
+$storedocurl="/cgi-bin/storedoc.cgi";
+
/* initialisation section */
$self=$PHP_SELF;
@@ -917,6 +919,11 @@ if(($errno=Udm_Errno($udm_agent))>0){
$crc=Udm_Get_Res_Field($res,$i,UDM_FIELD_CRC);
$rec_id=Udm_Get_Res_Field($res,$i,UDM_FIELD_URLID);
+ if (Udm_Api_Version() >= 30203) {
+ $doclang=Udm_Get_Res_Field($res,$i,UDM_FIELD_LANG);
+ $doccharset=Udm_Get_Res_Field($res,$i,UDM_FIELD_CHARSET);
+ }
+
if ($phpver >= 40006) {
$category=Udm_Get_Res_Field($res,$i,UDM_FIELD_CATEGORY);
} else {
@@ -928,6 +935,17 @@ if(($errno=Udm_Errno($udm_agent))>0){
print (($desc != '')?$desc:$text."...<BR>$t_DY<UL><li>\n");
print ("<A HREF=\"$url\" TARGET=\"_blank\">$url</A>\n");
print ("($contype) $lastmod, $docsize bytes</UL></DL>\n");
+
+ if (Udm_Api_Version() >= 30203) {
+ $storedstr="$storedocurl?rec_id=".Udm_CRC32($udm_agent,$url).
+ "&DM=".urlencode($lastmod).
+ "&DS=$docsize".
+ "&L=$doclang".
+ "&CS=$doccharset".
+ "&DU=".urlencode($url).
+ "&q=".urlencode($query_orig);
+ print ("<DD><a href=\"$storedstr\">Cached copy</a>\n");
+ }
}
print("<HR><CENTER> $nav </CENTER>\n");