#!/usr/bin/php read())) { if (is_file(DIRTODO.$entry) && preg_match('/.*\.ocd/', $entry)) { $fname = DIRTODO.$entry; echo "Working on $fname...."; $b = $prs->parse_file($fname); if (!$b) { echo "Parsing failed!\n ".$prs->errmsg."\n"; continue; } echo "\n Name: ".$prs->cdname; echo "\n #defs: ".sizeof($prs->cddefs); $cd_id = $omdb->CreateOrGetCDID($prs->cdname, $prs->cddescription); $omdb->SetDefs($cd_id, $prs->cddefs); echo "\n Done.\n"; } } ob_end_flush(); ?>