Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 8 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(208581742620900,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);

?>