<?php
require_once("panacea_api.php");
$api->setUsername("demouser");
$api->setPassword("demouser");
$file = "../generic/mybatch.csv";
if($api->ok($result)) {
/* Batch created ! */
$batch_id = $result['details'];
echo "Batch created with ID {$batch_id}\n";
/* Let's create another one from XLS */
$file = "../generic/mybatch.xls";
$result =
$api->batch_create("My second batch", $file, 0, false, 'xls');
if($api->ok($result)) {
echo "XLS Batch created!\n";
/* Give it a moment to parse */
if($status['details']['status'] == 32) { // Is it currently paused and waiting?
/* Let's wait a while and see if it's done */
}
}
}
?>