I want to log each visitors IP address and time of visit into a file. Does PHP handle flocking?
Here is my code for writing
if ($file=fopen("visitor.log", "a")) {
fputs($file, "$visitorinfo\n");
}
Please tell me if that will write the $visitorinfo into the file?
Also tell me if filelocking is needed and does PHP automatically do or do I have to add some code to it. If it needs it, can you add the neccessary code!
Please respond as soon as possible!
Thanks in advance!