I need to consume the real time tweets sample. I have this piece of code but i could not get anything ma i calling the right link. definitely i put the right username and password but still it did not go through. Please advice is it because twitter changed the API recently. Sorry if the question is basic I am new to that. Thanks in advance
<?php
//datacollector.php
$fp =
fopen("http://username:pass@stream.twitter.com/spritzer.json
while($data = fgets($fp))
{
$time = date("YmdH");
if ($newTime!=$time)
{
@fclose($fp2);
$fp2 = fopen("{$time}.txt","a");
}
fputs($fp2,$data);
$newTime = $time;
}
?>