#!/usr/bin/php
<?php
+if(!isset($_SERVER["TERM"])) {
+ print "<br /><br />This script should only be invoked from command line!<br />\n";
+ die;
+}
+
require_once "phpfspot.class.php";
$fspot = new PHPFSPOT;
-$fspot->gen_thumbs(0, 'fromcmd');
+$fspot->fromcmd = true;
+
+$all = $fspot->getPhotoSelection();
+
+foreach($all as $photo) {
+ $fspot->gen_thumb($photo);
+}
?>