Search
}
else
{
// include the class
include("nusoap/nusoap.php");
// create a instance of the SOAP client object
$soapclient = new soapclient("http://slashdemocracy.org/cgi-bin/ws4lsql.cgi");
// uncomment the next line to see debug messages
// $soapclient->debug_flag = 1;
// set up an array containing input parameters to be
// passed to the remote procedure
$params = array(
'query' => $_POST['query'], // search term
'catid' => '',
'bool' => '',
'substring' => '',
'nh' => '',
'mh' => 10,
'so' => '',
'sb' => ''
);
// invoke the method on the server
$result = $soapclient->call("doLinksSearch", $params, "urn:WS4lsql", "urn:WS4lsql#doLinksSearch");
// print the results of the search
if ($result['faultstring'])
{
?>
Error
echo $result['faultstring'];?>
}
else
{
?>
Search Results
Your search gave =$result['link_hits']?> hits. Here are the top ten:
if (is_array($result['LinkResults']))
{
foreach ($result['LinkResults'] as $r)
{
echo "- " . $r['Title'] . "";
echo "
";
echo $r['Description'];
echo "";
}
}
?>
}
}
?>