Make sure there are no spaces before the first tag. Try the following:
<?php //Declarations $file = "data.txt"; //The file to read from.
Set the $ file variable to the desired file. Note. I don't know how well this works for a 4gb file. Tell me if it is not.
EDIT: Here is another solution, it should work better with a large file (parses as it reads the file).
<?php set_time_limit(0); //Declarations $file = "data.txt"; //The file to read from.
source share