Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : YAZ Functions : yaz_scan

yaz_scan

Prepares for a scan (PHP 4 >= 4.0.5, PECL yaz:0.9-1.0.9)
void yaz_scan ( resource id, string type, string startterm [, array flags] )

Example 2678. PHP function that scans titles

<?php
function scan_titles($id, $startterm)
{
 
yaz_scan($id, "rpn", "@attr 1=4 " . $startterm);
 
yaz_wait();
 
$errno = yaz_errno($id);
 if (
$errno == 0) {
   
$ar = yaz_scan_result($id, &$options);
   echo
'Scan ok; ';
   foreach (
$options as $key => $val) {
     echo
"$key = $val &nbsp;";
   }
   echo
'<br /><table>';
   while (list(
$key, list($k, $term, $tcount)) = each($ar)) {
     if (empty(
$k)) continue;
     echo
"<tr><td>$term</td><td>$tcount</td></tr>";
   }
   echo
'</table>';
 } else {
   echo
"Scan failed. Error: " . yaz_error($id) . "<br />";
 }
}
?>

Change Language


Follow Navioo On Twitter
yaz_addinfo
yaz_ccl_conf
yaz_ccl_parse
yaz_close
yaz_connect
yaz_database
yaz_element
yaz_errno
yaz_error
yaz_es_result
yaz_es
yaz_get_option
yaz_hits
yaz_itemorder
yaz_present
yaz_range
yaz_record
yaz_scan_result
yaz_scan
yaz_schema
yaz_search
yaz_set_option
yaz_sort
yaz_syntax
yaz_wait
eXTReMe Tracker