Документация PHP


yaz_scan_result

yaz_schema

YAZ Функции

PHP Manual


yaz_scan

(PHP 4 >= 4.0.5, PECL yaz:0.9-1.0.9)

yaz_scan — Prepares for a scan

Описание

void yaz_scan ( resource $id , string $type , string $startterm [, array $flags ] )

This function prepares for a Z39.50 Scan Request on the specified connection.

To actually transfer the Scan Request to the server and receive the Scan Response, yaz_wait() must be called. Upon completion of yaz_wait() call yaz_error() and yaz_scan_result() to handle the response.

Список параметров

id

The connection resource returned by yaz_connect().

type

Currently only type rpn is supported.

startterm

Starting term point for the scan.

The form in which the starting term is specified is given by parameter type .

The syntax this parameter is similar to the RPN query as described in yaz_search(). It consists of zero or more @attr-operator specifications, then followed by exactly one token.

flags

This optional parameter specifies additional information to control the behaviour of the scan request. Three indexes are currently read from the flags array: number (number of terms requested), position (preferred position of term) and stepSize (preferred step size).

Возвращаемые значения

Эта функция не возвращает значения после выполнения.

Примеры

Пример #1 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 />";
  }
}
?>


yaz_scan_result

yaz_schema

YAZ Функции

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…