PHP-MARC

Description

PHP-MARC is a complete, native MARC management library written in and for PHP. It is very similar to the Perl library MARC::Record and most MARC rules have been looked up there. PHP-MARC is officially part of the Emilda Project, but has been separated to let other than Emilda users benefit from MARC management in php.

This package is still in the early stages, and thus needs all the testing possible. If you have comments or questions, please join the PHP-MARC mailing list and you'll hopefully get your questions answered.

Downloads

Releases

Product Version Release Date Links
PHP-MARC 0.1.1 28 June 2005 [Download]

CVS

The Emilda CVS repository is hosted by Sourceforge.net and is available to the public. The CVS version contains the absolutely latest development and can be broken. This is only recommended for developers and people who like to live on the edge.

The CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set.

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/emilda login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/emilda co php-marc

Browse the CVS Repository

Examples

require_once "php-marc/php-marc.php"

$string = file("/path/to/record/0000000001");
$file = new USMARC($string[0]);

/* OR */

$file = new File("/path/to/record/0000000001");

$record = $file->next();
$field = new Field("245", "", "", array("a" => "Mumin"));
$field->add_subfields(array("b" => "Muminpappans Memoarer"));
$field->update(array("ind2" => "1", "a" => "Muminsagor", "c" => "Tove Jansson"));
print $field->string();
$record->append_fields($field);
print $record->ffield("245", "Title: %a, Remainder: %b and Responsibility: %c");