yaz_scan

(PHP 4 >= 4.0.5, PECL yaz >= 0.9.0)

yaz_scanPrepares for a scan

Beschreibung

yaz_scan(
    resource $id,
    string $type,
    string $startterm,
    array $flags = ?
): void

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.

Parameter-Liste

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).

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

Beispiel #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 />";
  }
}
?>

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Definition von Stored Procedures - eine Einführung

Stored Procedures sind vordefinierte SQL-Codeblöcke, die in einer Datenbank gespeichert sind und bei Bedarf aufgerufen werden können. ...

Bernie

Autor : ebiz-consult GmbH & Co. KG
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

What defines Laravel's developer community?

What factors contribute to the perceived happiness within the Laravel developer community, and how does this compare to other developer communitie ...

Geschrieben von BakhamMamodar am 01.05.2024 10:45:23
Forum: PHP Developer Forum
"How to warm cold entrance?"

What are some effective strategies for addressing the significant heat loss occurring in the entrance hall, which is noticeably the coldest area o ...

Geschrieben von NeerMohan am 01.05.2024 06:49:27
Forum: Fragen/Vorschläge zum Forum
Berechnungen durchführen

Hallo liebe Forenmitglieder, meine erste frage ist zum Aufbau meiner kleinen Berechnungswebseite, nichts kommerzielles, soll nur eine Anwendung f ...

Geschrieben von matze511 am 21.04.2024 21:42:37
Forum: PHP Developer Forum