HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //opt/alt/php74/usr/share/doc/pear/File_MARC/examples/marc_yaz.php
<?php
$dir = dirname(__FILE__);
require 'File/MARC.php';

// Define the usable fields for our CCL query
$ccl_fields = array(
    "ti" => "1=4",
    "au"  => "1=1",
    "isbn" => "1=7"
);

// Declare the array that will hold the parsed results
$ccl_results = array();

// Connect to the laurentian.ca Z39.50 server
$conn = yaz_connect('142.51.8.7:2200/UNICORN');
yaz_ccl_conf($conn, $ccl_fields);

// Define our query for a most excellent text
$ccl_query = "ti='derby' and au='scott'";

// Parse the CCL query into yaz's native format
$result = yaz_ccl_parse($conn, $ccl_query, $ccl_results);
if (!$result) {
    echo "Error: " . $ccl_results['errorstring'];
    exit();
}

// Submit the query
$rpn = $ccl_results['rpn'];
yaz_search($conn, 'rpn', $rpn);
yaz_wait();

// Any errors trying to retrieve this record?
$error = yaz_error($conn);
if ($error) {
    print "Error: $error\n";
    exit();
}

// Retrieve the first MARC record as raw MARC
$rec = yaz_record($conn, 1, "raw");
if (!$rec) {
    print "Error: Retrieved no results.\n";
    exit();
}

// Parse the retrieved MARC record
$marc_file = new File_MARC($rec, File_MARC::SOURCE_STRING); 

while ($marc_record = $marc_file->next()) {
    print $marc_record;
    print "\n";
}
?>