Get Total follower with Twitter API

It's very easy. see the code. I recommend to use with XML for twitter api. XML feedback is more faster than json.
<?php

$toopen="http://twitter.com/users/show.xml?screen_name=saturngod ";

$ch = curl_init(); /// initialize a cURL session
curl_setopt($ch, CURLOPT_URL, $toopen );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec ($ch);//end get cool feedburner count
curl_close($ch);

$dom = new DOMDocument();
$dom->preserveWhiteSpace = false;
$dom->loadXML($content);
$count=$dom->getElementsByTagName("followers_count")->item(0)->nodeValue;
$twitt=$dom->getElementsByTagName("text")->item(0)->nodeValue;

?>
comments powered byDisqus