-
Notifications
You must be signed in to change notification settings - Fork 0
/
sphinxapi.php
679 lines (591 loc) · 20.1 KB
/
sphinxapi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
<?php
//
// $Id: sphinxapi.php,v 1.46 2007/04/01 21:38:13 shodan Exp $
//
//
// Copyright (c) 2001-2007, Andrew Aksyonoff. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License. You should have
// received a copy of the GPL license along with this program; if you
// did not, you can find it at http://www.gnu.org/
//
/////////////////////////////////////////////////////////////////////////////
// PHP version of Sphinx searchd client (PHP API)
/////////////////////////////////////////////////////////////////////////////
/// known searchd commands
define ( "SEARCHD_COMMAND_SEARCH", 0 );
define ( "SEARCHD_COMMAND_EXCERPT", 1 );
define ( "SEARCHD_COMMAND_UPDATE", 2 );
/// current client-side command implementation versions
define ( "VER_COMMAND_SEARCH", 0x107 );
define ( "VER_COMMAND_EXCERPT", 0x100 );
define ( "VER_COMMAND_UPDATE", 0x100 );
/// known searchd status codes
define ( "SEARCHD_OK", 0 );
define ( "SEARCHD_ERROR", 1 );
define ( "SEARCHD_RETRY", 2 );
define ( "SEARCHD_WARNING", 3 );
/// known match modes
define ( "SPH_MATCH_ALL", 0 );
define ( "SPH_MATCH_ANY", 1 );
define ( "SPH_MATCH_PHRASE", 2 );
define ( "SPH_MATCH_BOOLEAN", 3 );
define ( "SPH_MATCH_EXTENDED", 4 );
/// known sort modes
define ( "SPH_SORT_RELEVANCE", 0 );
define ( "SPH_SORT_ATTR_DESC", 1 );
define ( "SPH_SORT_ATTR_ASC", 2 );
define ( "SPH_SORT_TIME_SEGMENTS", 3 );
define ( "SPH_SORT_EXTENDED", 4 );
/// known attribute types
define ( "SPH_ATTR_INTEGER", 1 );
define ( "SPH_ATTR_TIMESTAMP", 2 );
/// known grouping functions
define ( "SPH_GROUPBY_DAY", 0 );
define ( "SPH_GROUPBY_WEEK", 1 );
define ( "SPH_GROUPBY_MONTH", 2 );
define ( "SPH_GROUPBY_YEAR", 3 );
define ( "SPH_GROUPBY_ATTR", 4 );
/// sphinx searchd client class
class SphinxClient
{
var $_host; ///< searchd host (default is "localhost")
var $_port; ///< searchd port (default is 3312)
var $_offset; ///< how many records to seek from result-set start (default is 0)
var $_limit; ///< how many records to return from result-set starting at offset (default is 20)
var $_mode; ///< query matching mode (default is SPH_MATCH_ALL)
var $_weights; ///< per-field weights (default is 1 for all fields)
var $_sort; ///< match sorting mode (default is SPH_SORT_RELEVANCE)
var $_sortby; ///< attribute to sort by (defualt is "")
var $_min_id; ///< min ID to match (default is 0)
var $_max_id; ///< max ID to match (default is UINT_MAX)
var $_filters; ///< search filters
var $_groupby; ///< group-by attribute name
var $_groupfunc; ///< group-by function (to pre-process group-by attribute value with)
var $_groupsort; ///< group-by sorting clause (to sort groups in result set with)
var $_maxmatches; ///< max matches to retrieve
var $_error; ///< last error message
var $_warning; ///< last warning message
/////////////////////////////////////////////////////////////////////////////
// common stuff
/////////////////////////////////////////////////////////////////////////////
/// create a new client object and fill defaults
function SphinxClient ()
{
$this->_host = "localhost";
$this->_port = 3312;
$this->_offset = 0;
$this->_limit = 20;
$this->_mode = SPH_MATCH_ALL;
$this->_weights = array ();
$this->_sort = SPH_SORT_RELEVANCE;
$this->_sortby = "";
$this->_min_id = 0;
$this->_max_id = 0xFFFFFFFF;
$this->_filters = array ();
$this->_groupby = "";
$this->_groupfunc = SPH_GROUPBY_DAY;
$this->_groupsort = "@group desc";
$this->_maxmatches = 1000;
$this->_error = "";
$this->_warning = "";
}
/// get last error message (string)
function GetLastError ()
{
return $this->_error;
}
/// get last warning message (string)
function GetLastWarning ()
{
return $this->_warning;
}
/// set searchd server
function SetServer ( $host, $port )
{
assert ( is_string($host) );
assert ( is_int($port) );
$this->_host = $host;
$this->_port = $port;
}
/////////////////////////////////////////////////////////////////////////////
/// connect to searchd server
function _Connect ()
{
if (!( $fp = @fsockopen ( $this->_host, $this->_port ) ) )
{
$this->_error = "connection to {$this->_host}:{$this->_port} failed";
return false;
}
// check version
list(,$v) = unpack ( "N*", fread ( $fp, 4 ) );
$v = (int)$v;
if ( $v<1 )
{
fclose ( $fp );
$this->_error = "expected searchd protocol version 1+, got version '$v'";
return false;
}
// all ok, send my version
fwrite ( $fp, pack ( "N", 1 ) );
return $fp;
}
/// get and check response packet from searchd server
function _GetResponse ( $fp, $client_ver )
{
$header = fread ( $fp, 8 );
list ( $status, $ver, $len ) = array_values ( unpack ( "n2a/Nb", $header ) );
$response = "";
$left = $len;
while ( $left>0 && !feof($fp) )
{
$chunk = fread ( $fp, $left );
if ( $chunk )
{
$response .= $chunk;
$left -= strlen($chunk);
}
}
fclose ( $fp );
// check response
$read = strlen ( $response );
if ( !$response || $read!=$len )
{
$this->_error = $len
? "failed to read searchd response (status=$status, ver=$ver, len=$len, read=$read)"
: "received zero-sized searchd response";
return false;
}
// check status
if ( $status==SEARCHD_WARNING )
{
list(,$wlen) = unpack ( "N*", substr ( $response, 0, 4 ) );
$this->_warning = substr ( $response, 4, $wlen );
return substr ( $response, 4+$wlen );
}
if ( $status==SEARCHD_ERROR )
{
$this->_error = "searchd error: " . substr ( $response, 4 );
return false;
}
if ( $status==SEARCHD_RETRY )
{
$this->_error = "temporary searchd error: " . substr ( $response, 4 );
return false;
}
if ( $status!=SEARCHD_OK )
{
$this->_error = "unknown status code '$status'";
return false;
}
// check version
if ( $ver<$client_ver )
{
$this->_warning = sprintf ( "searchd command v.%d.%d older than client's v.%d.%d, some options might not work",
$ver>>8, $ver&0xff, $client_ver>>8, $client_ver&0xff );
}
return $response;
}
/////////////////////////////////////////////////////////////////////////////
// searching
/////////////////////////////////////////////////////////////////////////////
/// set match offset, count, and max number to retrieve
function SetLimits ( $offset, $limit, $max=0 )
{
assert ( is_int($offset) );
assert ( is_int($limit) );
assert ( $offset>=0 );
assert ( $limit>0 );
assert ( $max>=0 );
$this->_offset = $offset;
$this->_limit = $limit;
if ( $max>0 )
$this->_maxmatches = $max;
}
/// set match mode
function SetMatchMode ( $mode )
{
assert ( $mode==SPH_MATCH_ALL
|| $mode==SPH_MATCH_ANY
|| $mode==SPH_MATCH_PHRASE
|| $mode==SPH_MATCH_BOOLEAN
|| $mode==SPH_MATCH_EXTENDED );
$this->_mode = $mode;
}
/// set matches sorting mode
function SetSortMode ( $mode, $sortby="" )
{
assert (
$mode==SPH_SORT_RELEVANCE ||
$mode==SPH_SORT_ATTR_DESC ||
$mode==SPH_SORT_ATTR_ASC ||
$mode==SPH_SORT_TIME_SEGMENTS ||
$mode==SPH_SORT_EXTENDED );
assert ( is_string($sortby) );
assert ( $mode==SPH_SORT_RELEVANCE || strlen($sortby)>0 );
$this->_sort = $mode;
$this->_sortby = $sortby;
}
/// set per-field weights
function SetWeights ( $weights )
{
assert ( is_array($weights) );
foreach ( $weights as $weight )
assert ( is_int($weight) );
$this->_weights = $weights;
}
/// set IDs range to match
/// only match those records where document ID
/// is beetwen $min and $max (including $min and $max)
function SetIDRange ( $min, $max )
{
assert ( is_int($min) );
assert ( is_int($max) );
assert ( $min<=$max );
$this->_min_id = $min;
$this->_max_id = $max;
}
/// set values filter
/// only match those records where $attribute column values
/// are in specified set
function SetFilter ( $attribute, $values, $exclude=false )
{
assert ( is_string($attribute) );
assert ( is_array($values) );
assert ( count($values) );
if ( is_array($values) && count($values) )
{
foreach ( $values as $value )
assert ( is_int($value) );
$this->_filters[] = array ( "attr"=>$attribute, "exclude"=>$exclude, "values"=>$values );
}
}
/// set range filter
/// only match those records where $attribute column value
/// is beetwen $min and $max (including $min and $max)
function SetFilterRange ( $attribute, $min, $max, $exclude=false )
{
assert ( is_string($attribute) );
assert ( is_int($min) );
assert ( is_int($max) );
assert ( $min<=$max );
$this->_filters[] = array ( "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max );
}
/// set grouping attribute and function
///
/// in grouping mode, all matches are assigned to different groups
/// based on grouping function value.
///
/// each group keeps track of the total match count, and the best match
/// (in this group) according to current sorting function.
///
/// the final result set contains one best match per group, with
/// grouping function value and matches count attached.
///
/// groups in result set could be sorted by any sorting clause,
/// including both document attributes and the following special
/// internal Sphinx attributes:
///
/// - @id - match document ID;
/// - @weight, @rank, @relevance - match weight;
/// - @group - groupby function value;
/// - @count - amount of matches in group.
///
/// the default mode is to sort by groupby value in descending order,
/// ie. by "@group desc".
///
/// "total_found" would contain total amount of matching groups over
/// the whole index.
///
/// WARNING: grouping is done in fixed memory and thus its results
/// are only approximate; so there might be more groups reported
/// in total_found than actually present. @count might also
/// be underestimated.
///
/// for example, if sorting by relevance and grouping by "published"
/// attribute with SPH_GROUPBY_DAY function, then the result set will
/// contain one most relevant match per each day when there were any
/// matches published, with day number and per-day match count attached,
/// and sorted by day number in descending order (ie. recent days first).
function SetGroupBy ( $attribute, $func, $groupsort="@group desc" )
{
assert ( is_string($attribute) );
assert ( is_string($groupsort) );
assert ( $func==SPH_GROUPBY_DAY
|| $func==SPH_GROUPBY_WEEK
|| $func==SPH_GROUPBY_MONTH
|| $func==SPH_GROUPBY_YEAR
|| $func==SPH_GROUPBY_ATTR );
$this->_groupby = $attribute;
$this->_groupfunc = $func;
$this->_groupsort = $groupsort;
}
/// connect to searchd server and run given search query
///
/// $query is query string
/// $index is index name to query, default is "*" which means to query all indexes
///
/// returns false on failure
/// returns hash which has the following keys on success:
/// "matches"
/// hash which maps found document_id to ( "weight", "group" ) hash
/// "total"
/// total amount of matches retrieved (upto SPH_MAX_MATCHES, see sphinx.h)
/// "total_found"
/// total amount of matching documents in index
/// "time"
/// search time
/// "words"
/// hash which maps query terms (stemmed!) to ( "docs", "hits" ) hash
function Query ( $query, $index="*" )
{
if (!( $fp = $this->_Connect() ))
return false;
/////////////////
// build request
/////////////////
$req = pack ( "NNNN", $this->_offset, $this->_limit, $this->_mode, $this->_sort ); // mode and limits
$req .= pack ( "N", strlen($this->_sortby) ) . $this->_sortby;
$req .= pack ( "N", strlen($query) ) . $query; // query itself
$req .= pack ( "N", count($this->_weights) ); // weights
foreach ( $this->_weights as $weight )
$req .= pack ( "N", (int)$weight );
$req .= pack ( "N", strlen($index) ) . $index; // indexes
$req .= // id range
pack ( "N", (int)$this->_min_id ) .
pack ( "N", (int)$this->_max_id );
// filters
$req .= pack ( "N", count($this->_filters) );
foreach ( $this->_filters as $filter )
{
$req .= pack ( "N", strlen($filter["attr"]) ) . $filter["attr"];
if ( isset($filter["values"]) )
{
$req .= pack ( "N", count($filter["values"]) );
foreach ( $filter["values"] as $value )
$req .= pack ( "N", $value );
} else
{
$req .= pack ( "NNN", 0, $filter["min"], $filter["max"] );
}
$req .= pack ( "N", $filter["exclude"] );
}
// group-by, max matches, sort-by-group flag
$req .= pack ( "NN", $this->_groupfunc, strlen($this->_groupby) ) . $this->_groupby;
$req .= pack ( "N", $this->_maxmatches );
$req .= pack ( "N", strlen($this->_groupsort) ) . $this->_groupsort;
////////////////////////////
// send query, get response
////////////////////////////
$len = strlen($req);
$req = pack ( "nnN", SEARCHD_COMMAND_SEARCH, VER_COMMAND_SEARCH, $len ) . $req; // add header
fwrite ( $fp, $req, $len+8 );
if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_SEARCH ) ))
return false;
//////////////////
// parse response
//////////////////
$result = array();
$max = strlen($response); // protection from broken response
// read schema
$p = 0;
$fields = array ();
$attrs = array ();
list(,$nfields) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
while ( $nfields-->0 && $p<$max )
{
list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
$fields[] = substr ( $response, $p, $len ); $p += $len;
}
$result["fields"] = $fields;
list(,$nattrs) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
while ( $nattrs-->0 && $p<$max )
{
list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
$attr = substr ( $response, $p, $len ); $p += $len;
list(,$type) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
$attrs[$attr] = $type;
}
$result["attrs"] = $attrs;
// read match count
list(,$count) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
// read matches
while ( $count-->0 && $p<$max )
{
list ( $doc, $weight ) = array_values ( unpack ( "N*N*",
substr ( $response, $p, 8 ) ) );
$p += 8;
$doc = sprintf ( "%u", $doc ); // workaround for php signed/unsigned braindamage
$weight = sprintf ( "%u", $weight );
$result["matches"][$doc]["weight"] = $weight;
foreach ( $attrs as $attr=>$type )
{
list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
$result["matches"][$doc]["attrs"][$attr] = sprintf ( "%u", $val );
}
}
list ( $total, $total_found, $msecs, $words ) =
array_values ( unpack ( "N*N*N*N*", substr ( $response, $p, 16 ) ) );
$result["total"] = sprintf ( "%u", $total );
$result["total_found"] = sprintf ( "%u", $total_found );
$result["time"] = sprintf ( "%.3f", $msecs/1000 );
$p += 16;
while ( $words-->0 )
{
list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
$word = substr ( $response, $p, $len ); $p += $len;
list ( $docs, $hits ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8;
$result["words"][$word] = array (
"docs"=>sprintf ( "%u", $docs ),
"hits"=>sprintf ( "%u", $hits ) );
}
return $result;
}
/////////////////////////////////////////////////////////////////////////////
// excerpts generation
/////////////////////////////////////////////////////////////////////////////
/// connect to searchd server and generate exceprts from given documents
///
/// $docs is an array of strings which represent the documents' contents
/// $index is a string specifiying the index which settings will be used
/// for stemming, lexing and case folding
/// $words is a string which contains the words to highlight
/// $opts is a hash which contains additional optional highlighting parameters:
/// "before_match"
/// a string to insert before a set of matching words, default is "<b>"
/// "after_match"
/// a string to insert after a set of matching words, default is "<b>"
/// "chunk_separator"
/// a string to insert between excerpts chunks, default is " ... "
/// "limit"
/// max excerpt size in symbols (codepoints), default is 256
/// "around"
/// how much words to highlight around each match, default is 5
///
/// returns false on failure
/// returns an array of string excerpts on success
function BuildExcerpts ( $docs, $index, $words, $opts=array() )
{
assert ( is_array($docs) );
assert ( is_string($index) );
assert ( is_string($words) );
assert ( is_array($opts) );
if (!( $fp = $this->_Connect() ))
return false;
/////////////////
// fixup options
/////////////////
if ( !isset($opts["before_match"]) ) $opts["before_match"] = "<b>";
if ( !isset($opts["after_match"]) ) $opts["after_match"] = "</b>";
if ( !isset($opts["chunk_separator"]) ) $opts["chunk_separator"] = " ... ";
if ( !isset($opts["limit"]) ) $opts["limit"] = 256;
if ( !isset($opts["around"]) ) $opts["around"] = 5;
/////////////////
// build request
/////////////////
// v.1.0 req
$req = pack ( "NN", 0, 1 ); // mode=0, flags=1 (remove spaces)
$req .= pack ( "N", strlen($index) ) . $index; // req index
$req .= pack ( "N", strlen($words) ) . $words; // req words
// options
$req .= pack ( "N", strlen($opts["before_match"]) ) . $opts["before_match"];
$req .= pack ( "N", strlen($opts["after_match"]) ) . $opts["after_match"];
$req .= pack ( "N", strlen($opts["chunk_separator"]) ) . $opts["chunk_separator"];
$req .= pack ( "N", (int)$opts["limit"] );
$req .= pack ( "N", (int)$opts["around"] );
// documents
$req .= pack ( "N", count($docs) );
foreach ( $docs as $doc )
{
assert ( is_string($doc) );
$req .= pack ( "N", strlen($doc) ) . $doc;
}
////////////////////////////
// send query, get response
////////////////////////////
$len = strlen($req);
$req = pack ( "nnN", SEARCHD_COMMAND_EXCERPT, VER_COMMAND_EXCERPT, $len ) . $req; // add header
$wrote = fwrite ( $fp, $req, $len+8 );
if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_EXCERPT ) ))
return false;
//////////////////
// parse response
//////////////////
$pos = 0;
$res = array ();
$rlen = strlen($response);
for ( $i=0; $i<count($docs); $i++ )
{
list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) );
$pos += 4;
if ( $pos+$len > $rlen )
{
$this->_error = "incomplete reply";
return false;
}
$res[] = substr ( $response, $pos, $len );
$pos += $len;
}
return $res;
}
/////////////////////////////////////////////////////////////////////////////
// attribute updates
/////////////////////////////////////////////////////////////////////////////
/// update specified attributes on specified documents
///
/// $index is a name of the index to be updated
/// $attrs is an array of attribute name strings
/// $values is a hash where key is document id, and value is an array of
/// new attribute values
///
/// returns number of actually updated documents (0 or more) on success
/// returns -1 on failure
///
/// usage example:
/// $cl->UpdateAttributes ( array("group"), array(123=>array(456)) );
function UpdateAttributes ( $index, $attrs, $values )
{
// verify everything
assert ( is_string($index) );
assert ( is_array($attrs) );
foreach ( $attrs as $attr )
assert ( is_string($attr) );
assert ( is_array($values) );
foreach ( $values as $id=>$entry )
{
assert ( is_int($id) );
assert ( is_array($entry) );
assert ( count($entry)==count($attrs) );
foreach ( $entry as $v )
assert ( is_int($v) );
}
// build request
$req = pack ( "N", strlen($index) ) . $index;
$req .= pack ( "N", count($attrs) );
foreach ( $attrs as $attr )
$req .= pack ( "N", strlen($attr) ) . $attr;
$req .= pack ( "N", count($values) );
foreach ( $values as $id=>$entry )
{
$req .= pack ( "N", $id );
foreach ( $entry as $v )
$req .= pack ( "N", $v );
}
// connect, send query, get response
if (!( $fp = $this->_Connect() ))
return -1;
$len = strlen($req);
$req = pack ( "nnN", SEARCHD_COMMAND_UPDATE, VER_COMMAND_UPDATE, $len ) . $req; // add header
fwrite ( $fp, $req, $len+8 );
if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_UPDATE ) ))
return -1;
// parse response
list(,$updated) = unpack ( "N*", substr ( $response, $p, 4 ) );
return $updated;
}
}
//
// $Id: sphinxapi.php,v 1.46 2007/04/01 21:38:13 shodan Exp $
//
?>