Hi,
I’m working on a flash twitter feed which uses PHP to generate an xml file, which in turn the flash file reads. If I specify a twitter account then this all works fine, but I need it to randomly display one of three account feeds. Here’s where I’ve got to with the PHP to pick a random user-
<?php
$twitArray = new
Array("username1.xml","username2.xml","username3.xml");
$randomName = $twitArray[rand(0,count($twitArray))];
$url = "http://twitter.com/statuses/user_timeline/" . $randomName;
$feedContent = file_get_contents($url);
if( $feedContent == "" )
{
exit;
}
else
{
$newfile="twitterRandom.xml";
$file = fopen ($newfile, "w");
fwrite($file, $feedContent);
fclose ($file);
}
?>
I don’t really know anything about PHP so can’t see why it wouldn’t be working?
Any help would really be appreciated, and if anyone wants the AS and PHP for displaying a specific Twitter feed just ask and I’ll post it here as that’s working fine.
Thanks,
Tom