I don't know if that's to do with your php, looks more likely a twitter problem to me. Looking at the error message, specifically this part: "HTTP request failed! HTTP/1.0 503 Service Unavailable " . This is saying, hey there is a server there, and it is up, but requests are not being allowed through. This could've been just twitter being overloaded, or could also mean your website has been rate limited by the twitter api.
An exceprt from the twitter api wiki -