Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

yaz scan function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php yaz scan () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.0.5, PHP 5)

yaz_scan -- Prepares for a scan

Syntax

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

This function prepares for a Z39.50 Scan Request, where parameter id specifies connection. Starting term point for the scan is given by startterm. The form in which the starting term is specified is given by parameter type. Currently only type rpn is supported. The optional parameter flags specifies additional information to control the behaviour of the scan request. Three indexes are currently read from the flags: number (number of terms requested), position (preferred position of term) and stepSize (preferred step size). 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.

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

Example 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; ';
    while (list(
$key, $val) = each($options)) {
      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 />";
  }
}
?>

Php yaz scan Function syntax tag

yaz scan php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php yaz scan syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online