Jump to content

Access log


TechXP

Recommended Posts

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?

Thanks
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.