PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Andrew Milsted   eprints Fetch   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example use
Class: eprints Fetch
Retrieve and parse eprints metadata
Author: By
Last change:
Date: 18 years ago
Size: 829 bytes
 

Contents

Class file image Download
<?php
/*////////////////////////////////////////////////////////////////////////

    example.php

    EprintsFetch - A Toolkit for obtaing metadata from the Erint OAI2 interface

    Copyright (c) 2006 University of Southampton and bluerhinos.co.uk

////////////////////////////////////////////////////////////////////////*/

include('eprintsFetch.php');
//ids of eprints to fetch
$eprintids = array(20858, 17426, 20900,20942,20982);

//start a fetch
$fetch = new eprintFetch();

// Eprint URL - eg http://eprints.soton.ac.uk/
$fetch->config_eprinturl = "http://eprints.soton.ac.uk/";

// oai identifier prefix - eg oai:eprints.soton.ac.uk
$fetch->config_eprintoai = "oai:eprints.soton.ac.uk:";

//Runs through the eprints
foreach($eprintids as $eprintid)
   
$fetch->getoai($eprintid);

//to retrive the results
print_r($fetch->items);

?>