'.$htmltitle.' '.$microblogtitle.' RSS Feed http://'.$_SERVER['SERVER_NAME'].'/'.$basedir.' '.$tiem.' '.$tiem.''; foreach ($files as $shitpost) { $storyPubDate = date(DATE_RSS, strtotime(basename($shitpost))); $contents = file_get_contents($shitpost); #Set some sane defaults for cases where no user exists $email = "null@example.com"; $author = "X"; #Check the format, do needful based on what's here $json = json_decode($contents); if(is_null($json)) { //HAHAHA You thought you needed an XML parser, didn't you? $theRipper = explode("<",$contents); $theRipper = explode(">",$theRipper[2]); $storyTitle = $theRipper[1]; $theRipper = explode('"',$theRipper[0]); $storyLink = htmlspecialchars($theRipper[1]); $theRipper = explode("",$contents); $theRipper = explode("
",$theRipper[1]); $storyText = $theRipper[0]; $theRipper = explode("title=\"Posted by ",$contents); $theRipper = explode('"',$theRipper[1]); $poster = $theRipper[0]; if(isset($tcmsUsers[$poster])) { $email = $tcmsUsers[$poster]["email"]; $author = $tcmsUsers[$poster]["fullName"]; } $feed .= ' '.$storyTitle.' '.$storyLink.' '.basename($shitpost).'-'.$_SERVER["SERVER_NAME"].' '.$storyPubDate.' '.$email.' ('.$author.') '; } elseif (!empty($json->title) && !empty($json->url) && !empty($json->poster)) { if(isset($tcmsUsers[$json->poster])) { $email = $tcmsUsers[$json->poster]["email"]; $author = $tcmsUsers[$json->poster]["fullName"]; } $feed .= ' '.$json->title.' comment.']]> '.$json->url.' '.basename($shitpost).'-'.$_SERVER["SERVER_NAME"].' '.$storyPubDate.' '.$email.' ('.$author.') '; } } $feed .= '
'; print_r($feed); ?>