c_pattle Posted June 14, 2010 Share Posted June 14, 2010 I have the following code that grabs my twitter feed and displays it on my website. When I tested this on my local version it works fine but when I uploaded it to my webspace it doesn't seem to work. I don't think it's a problem with the coding, maybe a permission problem on the server? $doc = new DOMDocument(); $doc->load('https://twitter.com/statuses/user_timeline/155522147.rss'); $doc -> save ("webmango_twitter.xml"); $channel = $doc->getElementsByTagName("channel"); foreach($channel as $chnl) { $item = $chnl->getElementsByTagName("item"); foreach($item as $itemgotten) { $describe = $itemgotten->getElementsByTagName("description"); $publish_date = $itemgotten->getElementsByTagName("pubDate"); $twitter_description = $describe->item(0)->nodeValue; $twitter_postdate = $publish_date->item(0)->nodeValue; $_SESSION['twitter'] .= "<li>" . $twitter_description . " - Posted on: " . $twitter_postdate . "</li>"; } } Link to comment https://forums.phpfreaks.com/topic/204788-problem-with-twitter-feed/ Share on other sites More sharing options...
c_pattle Posted June 14, 2010 Author Share Posted June 14, 2010 actually sorry forget that, it turns out twitter have somehow blocked the feed Link to comment https://forums.phpfreaks.com/topic/204788-problem-with-twitter-feed/#findComment-1072140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.