Hey guys.
OK… Im trying to build a small flash widget that loads in data from twitters ‘user_timeline.xml’ file. Now due to twitters strict crossdomain policy i have had to sort some PHP to gather the xml data and save it as a new XML file on my server from which the flash reads.
The problem is that the script can only be called 150 times per hour due to twitters API limits, so i have three options,
1) Make the flash call the PHP script every time its launched and effectively break the file due to the API limits.
2) Manually update the XML by browsing to the PHP file every time i tweet on twitter
3) Ask one of you extremely kind people to help me create a PHP script that updates the XML file every 5-10 minutes or so.
So as i am on the forums its not hard to guess that i want to go with option 3. Is this something that is easy to do? i basically want the script to run every 5-10 minutes so that the twitter widget is more or less up to date but i dont run into any bother with the API limits.
This is my PHP script…
<?php //load in the xml ---
$theRAW = file_get_contents("http://twitter.com/statuses/user_timeline/flashjunkie.xml?count=1");
$theXML = simplexml_load_string($theRAW);
//load in xml file
$xmlFile = "twitter.xml";
$xmlHandle = fopen($xmlFile, "w");
//set xml as string
$xmlString = $theXML?>asXML();
echo($xmlString);
//write xml to file
fwrite($xmlHandle, $xmlString);
//close out xml file
fclose($xmlHandle);
?>
Any help, code or advice is MUCH appreciated 
Thanks
Jay

lol