Beispiel #1
0
if ($req->getDef('output', '') == 'xml') {
	echo "<xml>";
} # if

try {
	$db = new SpotDb($settings['db']);
	$db->connect();
} 
catch(Exception $x) {
	die("Unable to connect to database: " . $x->getMessage() . PHP_EOL);
} # catch

## Als we forceren om de "already running" check te bypassen, doe dat dan
if ((isset($argc)) && ($argc > 1) && ($argv[1] == '--force')) {
	$db->setRetrieverRunning($settings['nntp_hdr']['host'], false);
} # if

## Spots
try {

	$retriever = new SpotRetriever_Spots($settings['nntp_hdr'], 
										 $db, 
										 $settings,										 
										 $settings['rsa_keys'], 
										 $req->getDef('output', ''),
										 $settings['retrieve_full']);
	$msgdata = $retriever->connect($settings['hdr_group']);
	$retriever->displayStatus('dbcount', $db->getSpotCount());
	
	$curMsg = $db->getMaxArticleId($settings['nntp_hdr']['host']);