";
$twtsURL = $_GET['url'];
echo "after GET(url): ".$twtsURL."
";
if (filter_var($twtsurl, FILTER_VALIDATE_URL) === FALSE) {
die('Not a valid URL');
}
$parsedTwtxtFile = getTwtsFromTwtxtString($twtsURL);
if (!is_null($parsedTwtxtFile)) {
$parsedTwtxtFiles[$parsedTwtxtFile->mainURL] = $parsedTwtxtFile;
}
} else { // Show timeline for the URL
$twtsURL = $config['public_txt_url'];
//$twtsURL = "http://darch.dk/twtxt.txt";
if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
die('Not a valid URL');
}
$parsedTwtxtFile = getTwtsFromTwtxtString($twtsURL);
if (!is_null($parsedTwtxtFile)) {
$parsedTwtxtFiles[$parsedTwtxtFile->mainURL] = $parsedTwtxtFile;
}
}
$twts = [];
# Combine all the followers twts
foreach ($parsedTwtxtFiles as $currentTwtFile) {
if (!is_null($currentTwtFile)) {
$twts += $currentTwtFile->twts;
}
}
krsort($twts, SORT_NUMERIC);
/* Profile header
if (empty($_GET['url'])) { // Show twts for some user
$twtsURL = $config['txt_file_path'];
if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
die('Not a valid URL');
}
$parsedTwtxtFile = getTwtsFromTwtxtString($twtsURL);
if (!is_null($parsedTwtxtFile)) {
$parsedTwtxtFiles[$parsedTwtxtFile->mainURL] = $parsedTwtxtFile;
}
}
*/
echo $twtsURL;
$profile = getTwtsFromTwtxtString($twtsURL);
?>
= $profile->description ?>
twtxt.txt | How to follow