//$dates = array( "0411", "0412", "0413", "0414", "0415", "0416", "0417", "0418", "0419", "0420" ); //$dates = array( "0421", "0422", "0423", "0424", "0425", "0426", "0427", "0428", "0429", "0430" ); //$dates = array( "0501", "0502", "0503", "0504", "0505" ); // , "0426", "0427", "0428", "0429", "0430" ); //$hosts = array( "bobbingwide.org.uk" ); $dates = array(); $startdate = oik_batch_query_value_from_argv(1, null); //echo "Start: $startdate" . PHP_EOL; $startdate = strtotime($startdate); $enddate = oik_batch_query_value_from_argv(2, null); if ($enddate) { $enddate = strtotime($enddate); } else { $enddate = time(); } //echo "End: $enddate" . PHP_EOL; $host = oik_batch_query_value_from_argv("host", null); if ($host) { $hosts = bw_as_array($host); } //$enddate = time(); //$enddate = strtotime( "2016-07-27" ); //$startdate = strtotime( "2015-06-01" ); //$enddate = strtotime( "2015-07-0" ); //echo "start: $startdate" ; //echo "end: $enddate"; for ($thisdate = $startdate; $thisdate <= $enddate; $thisdate += 86400) { $dates[] = date("md", $thisdate); } echo " Start:" . reset($dates) . PHP_EOL; echo "End: " . end($dates) . PHP_EOL; /**
/** * Set the path for WPMS */ function oik_batch_set_path() { $path = oik_batch_query_value_from_argv("path", null); if ($path) { $_SERVER['REQUEST_URI'] = $path; } }