I had googled a code to fetch a public twitter content, it work fine when on my localhost but when I put it online on a hosted server, it does not seem to respond at all! Code is as below.
For example 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;
}
Note: The same code works as expected on my local system.