$read = fread($stat, filesize($stat)); $num = substr_count($read, "win"); echo $num;
it always returns 0,,,, Any ideas why?
I can't offer a fix, but have you tried reading it in line by line with your substr_count test?
Also, you might might have to reset your pointer in the $num string back to the begining like the array pointer?
Sorry, I hope something helps.
John
Tried printing $read? Tried checking wether the file can be opened at all?