Loading feeds followed by: '.$url.'
';
echo '';
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);
// Build Following List
$twtFollowingList = [];
foreach ($fileLines as $currentLine) {
if (str_starts_with($currentLine, '#')) {
if (!is_null(getDoubleParameter('follow', $currentLine))) {
$twtFollowingList[] = getDoubleParameter('follow', $currentLine);
}
}
}
/* Progress bar based on: https://github.com/w3shaman/php-progress-bar */
$i = 1;
$total = count($twtFollowingList);
foreach ($twtFollowingList as $following) {
$float = $i/$total;
$percent = intval($float * 100)."%";
// Javascript for updating the progress bar and information
echo '';
updateCachedFile($following[1]);
ob_flush(); // Send output to browser immediately
$i++;
}
// Tell user that the process is completed
echo '';
//header('Location: /');
exit();