Create a batch using a zip file using PHP


  1. <?php
  2. require_once("panacea_api.php");
  3. $api = new PanaceaApi();
  4. $api->setUsername("demouser");
  5. $api->setPassword("demouser");

  6. $file = "../generic/mybatch.zip";

  7. $result = $api->batch_create("My batch name", $file, 0, false, 'zip');

  8. if($api->ok($result)) {
  9. /* Batch created ! */

  10. $batch_id = $result['details'];

  11. echo "Batch created with ID {$batch_id}\n";

  12. }

  13. ?>