php Pulling a single line from HUGE text file
<p>I'm ok with PHP but probably not half as good as some of you guys on here.</p>

<p>I am basically trying to find a way to grab a line from a huge and I mean huge text file.... its basically a list of keywords I want to call by line number but without preferably going through them all before I get to that line.....otherwise couldmcrash my server obviously.</p>

<p>At the moment im using this </p>

<pre><code>$lines = file('http://www.mysite.com/keywords.txt');
foreach ($lines as $line_num =&gt; $line) {
   echo "$line_num";
}
</code></pre>

<p>This works but im sure theres gotta be a better way of doing to save on usuage because this is putting the whole file into the memory and if I can simply say to php give me line number 97, would umm RULE....</p>

<p>Hope you guys can come up with a solution as your much smarter than me :P ty </p>
