Home > Code Snippets, PHP, Tips > Short PHP twitter-counter

Short PHP twitter-counter

November 2nd, 2009 Leave a comment Go to comments

While strolling around I found some bits and pieces which I put together to get a short twitter counter in php.

<?php
ob_start
();
 
$json file_get_contents("http://twitter.com/statuses/user_timeline/php_trivandrum.json?count=1");
$data json_decode($jsontrue);
ob_get_clean();
 
echo 
$data[0]['user']['followers_count']; 
?>

Nothing more to write now..

  1. No comments yet.
  1. No trackbacks yet.

+ seventy seven = eighty three