Skip to content

Instantly share code, notes, and snippets.

@mmccollow
Created August 3, 2012 20:23
Show Gist options
  • Save mmccollow/3251210 to your computer and use it in GitHub Desktop.
Save mmccollow/3251210 to your computer and use it in GitHub Desktop.
extractFits function
<?php
function extractFits($parameterArray, $dsid, $file, $file_ext) {
$file_name = $file .'_'. $dsid .'.xml';
$output = array();
exec('fits.sh -i '. escapeshellarg($file) .'', $output);
if ( !file_put_contents($file_name, implode("\n", $output)) ) {
exit("Error writing file: ". $file_name);
}
$_SESSION['fedora_ingest_files']["$dsid"] = $file_name;
return TRUE;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment