I got two files a php file to process and record data to a text file
Now when a visitor visits a page on my website.... it records some information about them and it is sent to process.php and then process.php then records the data in a .txt file.
That works great. I simply use a php include function on pages i want tracked and it tracks the information and records it.
Problem i got is some of my webpages are in folders, i have realised that from testing that i cannot use full url to the text file for it to be written to. It seems my only way to get around it is by having multiple instances of the text file in folders. This is hard work thou as it means when i want to view the information i have to view several txt files not just one.
To make it more clear this is what i got by using http:// to write to the file:
Warning: fopen(http://www.my-dowmain-name.com/visitordata.txt) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/blahblah/public_html/visitorrecorder.php on line 37
So my questions is, is there a way i can get around this? Having multiple files to have to read through is not what i want, i want it store it all in one file.
I am very new to php and know i could setup a MySQL database but i rather use a txt file for storing the data.