Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Charl van Niekerk

By: a guest on Jan 24th, 2010  |  syntax: PHP  |  size: 0.58 KB  |  views: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. ini_set('include_path', 'resources/swordapp-php-library-0.9');
  4.  
  5. require_once 'packager_mets_swap.php';
  6. require_once 'swordappclient.php';
  7.  
  8. $package = new PackagerMetsSwap('tmp', 'test', 'tmp', 'test.zip');
  9. $package->addCreator('Charl van Niekerk');
  10. $package->setTitle('Test Title');
  11. $package->setAbstract('Test Abstract');
  12. $package->create();
  13.  
  14. $client = new SWORDAPPClient();
  15. $client->deposit('http://localhost:8080/sword', 'fedoraAdmin', 'charlvn', 'Charl van Niekerk', 'tmp/test.zip', 'http://purl.org/net/sword-types/METSDSpaceSIP', 'application/zip', false, true);