I have a piece of code, I'm not sure if you know what twitter is.. but it allows you to update your status.
Anyway sometimes twitter goes down and that means that my blog won't load... below is the current piece of code but I was wondering if you could fix it so that if twitter.com is down it will echo a different message?
PHP Code:
<?PHP
$twitter_url = "http://twitter.com/statuses/user_timeline/DanMillerUK.xml?count=1";
$buffer = file_get_contents($twitter_url);
$xml = new SimpleXMLElement($buffer);
$status_item = $xml -> status;
$status = $status_item -> text;
echo $status;
?>
If you could do the above I would really appreciate it!
Thanks in advance,
Dan
