Well, there are simple ways to read files into strings. It only takes about 4 lines of code.
Then, once stored in a string, you can parse it and pull whatever you would like out of it.
So, if the file is only a few lines, it will be very small. It would fit into a string without issues.
This code is how you read a file into a string:
[php]
$myFile = “pathtofile/filetoread.txt”;
$filehandle = fopen($myFile, ‘r’);
if (filesize($myFile) == 0){
die(“Empty data file!”);
}else{
$DataFile = fread($filehandle, filesize($myFile));
}
fclose($filehandle);
[/php]
I added a check for an empty file. This would be where you might change your display indicating this.
So, the $myFile is the pointer to wherever you have this file stored. The variable $DataFile can be called
anything, I just used this name. And, this routine will fill the variable with the text data from the file.
Then, you can use the string and search it and get the data you want. If you need further help with
that part, let us know…