Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6143451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:31:30+00:00 2026-05-23T18:31:30+00:00

I have a function in php, which lists followers of a user in twitter.

  • 0

I have a function in php, which lists followers of a user in twitter. When I use chrome to navigate to the page which holds the function, It works, sometimes it doesn’t.

Chrome works 3 out of 5 times before it gives “Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error”

Mozilla works 4 out of 5 times before it gives “Content Encoding Error”

Opera shows this

Warning: Invalid argument supplied for foreach() in
C:\wamp\www\ntwyt\core\common\twitter.php on line 1639
�j&x���o��4�a ���h��RA�N����T.&�Km�n� 5ý i�<Т
K���/o4�¨�b�@�Y�����

Here’s the code

function theme_followers($feed, $hide_pagination = false) {
    $rows = array();
    if (count($feed) == 0 || $feed == '[]') return '<p>No users to display.</p>';

    foreach ($feed->users->user as $user) {

        $name = theme('full_name', $user);
        $tweets_per_day = twitter_tweets_per_day($user);
        $last_tweet = strtotime($user->status->created_at);
        $content = "{$name}<br /><span class='about'>";
        if($user->description != "")
            $content .= "Bio: " . twitter_parse_tags($user->description) . "<br />";
        if($user->location != "")
            $content .= "Location: {$user->location}<br />";
        $content .= "Info: ";
        $content .= pluralise('tweet', $user->statuses_count, true) . ", ";
        $content .= pluralise('friend', $user->friends_count, true) . ", ";
        $content .= pluralise('follower', $user->followers_count, true) . ", ";
        $content .= "~" . pluralise('tweet', $tweets_per_day, true) . " per day<br />";
        $content .= "Last tweet: ";
        if($user->protected == 'true' && $last_tweet == 0)
            $content .= "Private";
        else if($last_tweet == 0)
            $content .= "Never tweeted";
        else
            $content .= twitter_date('l jS F Y', $last_tweet);
        $content .= "</span>";

        $rows[] = array('data' => array(array('data' => theme('avatar', theme_get_avatar($user)), 'class' => 'avatar'),
                                        array('data' => $content, 'class' => 'status shift')),
                        'class' => 'tweet');

    }

    $content = theme('table', array(), $rows, array('class' => 'followers'));
    if (!$hide_pagination)
    $content .= theme('list_pagination', $feed);
    return $content;
}

Whats the problem? It works and doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:31:30+00:00Added an answer on May 23, 2026 at 6:31 pm

    I think you want to loop:

    foreach ($feed->users as $user) {
        ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a php function which returns a random json encoded color <?php function
I have a load of php templates which uses a custom translate function __,
I have the following PHP function which will list the users from a MySql
I have PHP function which checks to see if variables are set and then
I have a small PHP Mysql function which generates all the columns within a
I have a simple user account mgmt page, which allows the admin to delete
I have a php function I wrote that will take a text file and
I have a PHP function that takes a variable number of arguments (using func_num_args()
I have a PHP function that requires can take 3 parameteres... I want to
I have created a function in PHP that calls a webservice and parses through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.