Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('api/sphinxapi.php');
- $cl = new SphinxClient();
- $cl->SetServer( "195.xxx.xxx.xxx", 3312 );
- $cl->SetMatchMode( SPH_MATCH_ANY );
- $cl->SetFilter( 'model', array( 3 ) );
- $result = $cl->Query( 'key', 'stage' );
- if ( $result === false ) {
- echo "Query failed: " . $cl->GetLastError() . ".\n";
- }
- else {
- if ( $cl->GetLastWarning() ) {
- echo "WARNING: " . $cl->GetLastWarning() . "
- ";
- }
- if ( ! empty($result["matches"]) ) {
- foreach ( $result["matches"] as $doc => $docinfo ) {
- echo "$doc\n";
- }
- print_r( $result );
- }
- }
- exit;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement