\n
\n";
#ob_flush();
const DEBUG_TIME_SECS = 300;
const PRODUCTION_TIME_SECS = 5;
$fileContent = getCachedFileContentsOrUpdate($url, PRODUCTION_TIME_SECS);
$fileContent = mb_convert_encoding($fileContent, 'UTF-8');
$fileLines = explode("\n", $fileContent);
$twtFollowingList = [];
foreach ($fileLines as $currentLine) {
if (str_starts_with($currentLine, '#')) {
if (!is_null(getDoubleParameter('follow', $currentLine))) {
$twtFollowingList[] = getDoubleParameter('follow', $currentLine);
}
}
}
# Load all the files
# Save a flag to know it's loading files in the background
foreach ($twtFollowingList as $following) {
echo "Updating: $following[1]
\n";
#ob_flush();
updateCachedFile($following[1]);
}
echo 'Finished';
#ob_flush();
header('Location: /');
exit();