.scripts/symbiota.php
/**
   * Step 1 - Retrieve Results.
   *
   * Connects to a public-facing RSS feed that returns all information about
   * Symbiota in a CSV format.
   */
Step 1 - Retrieve Results.
Connects to a public-facing RSS feed that returns all information about
Symbiota in a CSV format.
Step 1 - Retrieve Results . Connects to a public - facing RSS feed that returns all information about Symbiota in a CSV format .
public function retrieveResults() {
    $this->logger("Retrieving results.");
    file_put_contents("archive.zip", fopen("http://herbarium.biol.sc.edu/floracaroliniana/webservices/dwc/dwcapubhandler.php?collid=1&cond=collectioncode-equals:ACM", 'r'));
    $this->logger("Results received.");
    $zip = new ZipArchive;
    if ($zip->open('archive.zip') === TRUE) {
      $this->logger("Unzipping archive.");
      $zip->extractTo('./tmp/');
      $zip->close();
      unlink('./archive.zip');
    } else {
      throw new Exception("The archive does not exist.");
    }
  }
public function retrieveResults ( ) { $ this -> logger ( " Retrieving results. " ) ; file_put_contents ( " archive.zip " , fopen ( " http://herbarium.biol.sc.edu/floracaroliniana/webservices/dwc/dwcapubhandler.php?collid=1&cond=collectioncode-equals:ACM " , 'r' ) ) ; $ this -> logger ( " Results received. " ) ; $ zip = new ZipArchive ; if ( $ zip -> open ( 'archive.zip' ) === TRUE ) { $ this -> logger ( " Unzipping archive. " ) ; $ zip -> extractTo ( './tmp/' ) ; $ zip -> close ( ) ; unlink ( './archive.zip' ) ; } else { throw new Exception ( " The archive does not exist. " ) ; } }
Step 1 - Retrieve Results.
Step 1 - Retrieve Results .
// Unzip the archive. // Delete the archive.