Hi, I am trying to write a PHP script that can read COD 4 script files. So far, I only got it to read the first line, which I do not want, since I only want the relevant info in the file itself (Players name etc.). I also managed to get it to read the whole file. Again, something I do not want. I am having trouble getting to go through the file, and skipping the different characters that are written, such as dashes and the like. Also, this info is going to be added to a database afterwards. Suggestions?
Haven't coded for ages but changing an option in fread usually does the trick I think. There are a number of functions that operate on a variable that can strip out characters.
fgets($fhandle); will get a line fgetcsv($fhandle); will get it into an array if it's comma deliminated. http://uk3.php.net/manual/en/function.fgetcsv.php