<?php
$twitter_url = 'http://twitter.com/statuses/user_timeline/ishrikrishna.xml?count=1';
$buffer = file_get_contents($twitter_url);
$xml = new SimpleXMLElement($buffer);
$status = $xml -> status;
$tweet = $status -> text;
echo $tweet;
?>
I used this code to fetch tweets and it works successfully on localhost but not on my webhost, I tried this script on two webhosting services.
The problem i've noticed is that functions like file_get_contents(), simplexml_load_file() failed to fetch data from xml file(ex. rss files) stored on another server.
is there any solution's u know. Thanks in advance.