Information limit requests


#1

Hello,

I am going to do a php aplication to obtain the number of followers of a larg list of user. I am going to use this code. Has it got this code limit of requests, 350 request per hour?

$url = ‘http://api.twitter.com/1/users/show.xml?screen_name=’. $username;

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);

$xml = new SimpleXMLElement($data);
$count = $xml->followers_count;

$count = (float) $count;
$count = number_format($count);
return $count;


#2

If you’re performing this request without authentication, it’ll draw from the 150 requests per hour allowed to your IP address. Consider using [node:63] as well.


#3

But, how can I do with authentication? Can you give me an example? I would be very gratefull.

However, If I used this code I put here… Am I allowed 150 requests per hour or no?

function getFollowers($username){
$x = file_get_contents(“http://twitter.com/”.$username);
$doc = new DomDocument;
@$doc->loadHTML($x);
$ele = $doc->getElementById(‘follower_count’);
$innerHTML=preg_replace(’/^<[^>]>(.)<[^>]*>$/’,"\1",DOMElement_getOuterHTML($doc,$ele));
return $innerHTML;
}


#4

please i have many problems with my acount some people doase acounts and pretend that theynare me and i cant im fed up with this so plz varefi my acount so every one nows that is me thank you vaery much