There are multiple ways to read files with PHP. You can use file(), file_get_contents(), fsockopen(), or fopen() functions. If you want to read through a file line by line, though, you will want to use one of the latter two and use their pointer to navigate through your file. Get the code.