Posted By

maryann on 02/15/10


Tagged

twitter


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

dantreacy
jens89
nb109


Get amount of Twitter followers


 / Published in: PHP
 

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

  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. ?>

Report this snippet  

You need to login to post a comment.