PHP: Fetching lines from a text file
<p><strong>Edit:</strong> I've learned much since the posting of this question, and so I have rewritten it for anyone who similarly inquires.</p>

<p>I'm attempting to load a specified number of lines from the end of a text file via a HTTP GET request, which will be sent to a PHP file. Can this be done with <code>file_get_contents()</code>?</p>

<p>The function <code>file_get_contents()</code> also reads the entire file into memory. What is a more efficient solution than reading the entire file to array, then removing the specified number of lines?</p>

<p>For example, if I had a 12000 line text file, how would I read the range of lines between 4025-6042?</p>
