http_code);exit();
}
$t = getTwitter();
$userid = $_GET['id'];
$since_id = isset($_GET['since_id']) ? $_GET['since_id'] : false;
$max_id = isset($_GET['max_id']) ? $_GET['max_id'] : false;
if (isset($_GET['fav'])) {
$statuses = $t->getFavorites($userid, $since_id, $max_id);
} else {
$statuses = $t->userTimeline($userid, $since_id, $max_id);
}
if ($statuses === false) {
header('location: error.php?code='.$t->http_code);exit;
}
if ($t->http_code == 429) {
$apiout = true;
} else {
$aptout = false;
}
$user = $t->showUser($userid);
if (strcasecmp($userid,$t->username) == 0) {header('location: profile.php');exit();}
$isProtected = $statuses->error == 'Not authorized.';
$r = getRelationship($user->screen_name);
$isFriend = ($r & 1) != 0;
$isFollower = ($r & 2) != 0;
$isBlocked = ($r & 4) != 0;
$isMuted = ($r & 8) != 0;
if (!$isProtected) {
$userinfo = array();
$userinfo['name'] = $user->name;
$userinfo['screen_name'] = $user->screen_name;
$userinfo['friends_count'] = $user->friends_count;
$userinfo['statuses_count'] = $user->statuses_count;
$userinfo['followers_count'] = $user->followers_count;
$userinfo['url'] = $user->entities->url->urls[0]->expanded_url ? $user->entities->url->urls[0]->expanded_url : $user->url;
$userinfo['description'] = formatText($user->description);
$userinfo['location'] = $user->location;
$userinfo['date_joined'] = date('Y-m-d', format_time($user->created_at)); //from dabr
$userinfo['protected'] = $user->url;
$userinfo['id'] = $user->id;
$userinfo['image_url'] = getAvatar($user->profile_image_url);
?>
Following me
No tweet to display.
";
} else if ($apiout) {
echo "API quota is used out, please wait for a moment before next refresh.
";
} else {
$output = '';
$firstid = false;
$lastid = false;
foreach ($statuses as $status) {
if (isset($status->retweeted_status)) {
$output .= format_retweet($status);
} else {
$output .= format_timeline($status,$t->username);
}
if(!$firstid)
$firstid = $status->id_str;
$lastid = $status->id_str;
}
$lastid = bcsub($lastid, "1");
$output .= "
";
echo $output;
}
}//end of if(!$isProtected)
else {
?>
This user has been protected. You ought to follow before viewing this page.
|