Can I make an own access log wit PHP? (because of trouble at the hosting provider no access log available sometimes)
I thought about two ways:
1) There is one file who is handling the website: index.php. If I put a code on the top of that file. That code writes the data to a file called access.log. After that I can use awstats or something to analyse the log. Can this be done? Will the performance of the site go down? Anyone?
2) I use already a database on the website. It will made different queries. I can put one query in that that would insert access log data into it. After that I can make a cronjob with a script who will read the databsase and write an access log. Then I can run awstats to analyse it. Is this good for the performance of the website?
Can anyone give me advice?
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users