Fix line breaks, cross-platform
This conversion can be done by simple apps from the Dos2Unix package.
However, if you insist on writing your own converter, I'd suggest making fewer function calls. The function str_replace() can accept arrays, so there is no need for embedded calls.
$contents = str_replace(
    array(&quot;\r&quot;, &quot;\n&quot;, &quot;[%LINEBREAK%][%LINEBREAK%]&quot;, &quot;[%LINEBREAK%]&quot;),
    array(&quot;[%LINEBREAK%]&quot;, &quot;[%LINEBREAK%]&quot;, &quot;[%LINEBREAK%]&quot;, &quot;\r\n&quot;),
    fread($this-&gt;fp, filesize($this-&gt;filename))
);

However, you ought to be careful. For example, if your file has two Unix-standard newlines, i.e., \n\n, then your code will replace this with \r\n, which is only one Windows-standard newline.
This regex (see about its syntax here) would probably do the trick:
preg_replace('#(?&lt;!\r)\n|\r(?!\n)#', &quot;\r\n&quot;, fread($this-&gt;fp, filesize($this-&gt;filename)));

But I still think it's better to use already existing and proven software, like the one from the beginning of this answer, or simply turn on the auto_detect_line_endings setting, as suggested in the comments by 200_success.
By the way, if your files are huge, your fread will still (try to) read them whole at once, which is not pleasant for the computer memory and performance.