公開されているTwitterコンテンツを取得するコードをグーグルで検索しました。ローカルホストでは正常に機能しますが、ホストされているサーバーでオンラインにすると、まったく応答しないようです。コードは以下の通りです。
例えばurl ='https://twitter.com/#!/NatureMagazine'
if($entered['domain']=='twitter.com')
{
$baseName = basename($url);
// HINT Code works fine up to here but after this statement, nothing comes out
$sXML = new SimpleXMLElement('http://twitter.com/users/show.xml?screen_name='.$baseName, NULL, TRUE);
// TRUE specifies that data is a path or URL to an XML document instead of string data.
$screen_name = $sXML->screen_name;
$location = $sXML->location;
$description = $sXML->description;
}
注:同じコードがローカルシステムで期待どおりに機能します。