Get amount of Twitter followers


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. $xml=file_get_contents('http://twitter.com/users/show.xml?screen_name=catswhocode');
  3. if (preg_match('/followers_count>(.*)</',$xml,$match)!=0) {
  4. $tw['count'] = $match[1];
  5. }
  6. echo $tw['count'];
  7. ?>

URL: http://www.wprecipes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.