projects
/
phpyaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ad8c88
)
Add small client example
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 30 May 2014 09:38:31 +0000
(11:38 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 30 May 2014 09:38:31 +0000
(11:38 +0200)
client.php
[new file with mode: 0644]
patch
|
blob
diff --git a/client.php
b/client.php
new file mode 100644
(file)
index 0000000..
ebfbd61
--- /dev/null
+++ b/
client.php
@@ -0,0
+1,18
@@
+<?php
+$z = yaz_connect("localhost:9999");
+yaz_range($z, 1, 2);
+yaz_search($z,"rpn", "computer");
+yaz_wait();
+$error = yaz_error($z);
+if (!empty($error)) {
+ echo "Error: $error\n";
+} else {
+ $hits = yaz_hits($z);
+ echo "Result count $hits\n";
+ for ($p = 1; $p <= 2; $p++) {
+ $rec = yaz_record($z, $p, "string");
+ if (empty($rec)) break;
+ echo "----- $p -----\n$rec";
+ }
+}
+?>