<code>
require_once
(dirname(
__FILE__
).
'/SphinxClient.class.php'
);
$sph
=
new
SphinxClient()
$sph
->SetServer(
'localhost'
, 9312);
$sph
->SetConnectTimeout(5);
$sph
->SetMatchMode(SPH_MATCH_ANY);
$sph
->SetLimits(0, 1, 10000);
$result
=
$sph
->query(
$keyword
,
'*'
);
$total
=
$result
[
'total'
];
</code>