Try:
function SYS_newsFeed(){
$file = websiteURL()."/assets/database/feeds/news.txt";
$text = file_get_contents($file); //reads the contents of the file to a string variable.
$text = preg_replace("/%a%/","<span style=\"color:#99ff99\">",$text); //uses regex to do the replacement, I don't know parseCode.
return($text);
}
//to call it use:
echo(SYS_newsFeed());
readfile will attempt to open a file, read it into memory and output its contents immediately. It returns true if this is successful and false if it fails. The 54 you get at the end of the file is the number of bytes in the file, its printed by readfile.
file_get_contents reads the file contents into a string variable, it includes newlines.
Your parseCode will probably work if you give it the string returned by file_get_contents, but you only need to use it once. You also don't need to use so many variables, the operation performed on the right of the assignment operator (=) happens before the actual assignment, so you can do something like $var = 2; $var = $var * 3; and it will make $var 6.