Beispiel #1
0
        break;
    }
    for ($i = 0; $i < $offset; $i++) {
        next($posts);
    }
    while (list($key, $post) = each($posts)) {
        $offset++;
        if ($post['post_id'] == $lastPost) {
            break 2;
        }
    }
}
$ret = array();
$totalLimit = $offset + $limit;
try {
    $posts = WaPost::FindPostByWall($wall, $totalLimit);
    if (!$posts) {
        throw new Exception('暂无新帖。');
    }
} catch (Exception $e) {
    returnError($e->getMessage());
    return;
}
for ($i = 0; $i < $offset; $i++) {
    next($posts);
}
while (list($key, $post) = each($posts)) {
    $post_id = $post['post_id'];
    try {
        $postInfo = WaPost::GetPostInfo($post_id);
        if (!$postInfo) {