600) { echo "\n"; $sBuffer = @file_get_contents($GLOBALS['Settings']['URL']['API']); if (!empty($sBuffer)) { $xData = new SimpleXMLElement($sBuffer); $xStatusList = $xData -> status; $oOutputHandle = fopen($GLOBALS['Settings']['URL']['Output'], "w+"); $sOutputData = ""; $i = 0; foreach ($xStatusList as $oKey => $oValue) { // Extract and format the date.. $oDate = strtotime($oValue -> created_at) + $GLOBALS['Settings']['Time']['Offset']; $sDate = date($GLOBALS['Settings']['Time']['Format'], $oDate); // Extract the URL and body for this tweet.. $sTweetURL = "http://twitter.com/endseven/statuses/" . $oValue -> id; $sTweetBody = $oValue -> text; // If you were inclined, you could use these values.. // $xUser = $oValue -> user; // $GLOBALS['Settings']['URL']['Avatar'] = $xUser -> profile_image_url; // $sSource = $oValue -> source; $sOutputData .= "\n"; $sOutputData .= "\n"; $sOutputData .= ""; $sOutputData .= ""; $sOutputData .= "
\n"; $sOutputData .= "\n"; $sOutputData .= "\n"; $sOutputData .= "\n"; $sOutputData .= ""; $sOutputData .= ""; $sOutputData .= "
"; $sOutputData .= ""; $sOutputData .= ""; $sOutputData .= ""; $sOutputData .= ""; $sOutputData .= "
"; $sOutputData .= "
"; } fwrite($oOutputHandle, $sOutputData); fclose($oOutputHandle); } } if (file_exists($GLOBALS['Settings']['URL']['Output'])) { echo "\n"; echo file_get_contents($GLOBALS['Settings']['URL']['Output']); } else { echo "\n"; } ?>