could you not just open the first parts of it?
$fp = fopen("whatever.txt", "r+");
$firstBit = fread($fp, 5000);
fclose($fp);
That would get the first 5000 from it... or...
$contents = file("whatever.txt");
if its on a line by line basis, and you can do $contents[0]; for first element in the array.