Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 814571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:32:34+00:00 2026-05-15T01:32:34+00:00

What I wish to achieve is – log all information about each and every

  • 0

What I wish to achieve is – log all information about each and every visit to every page ofmy website (like ip address, browser, referring page, etc). Now this is easy to do.

What I am interested is doing this in a way so as to cause minimum overhead (runtime) in the php scripts. What is the best approach for this efficiency-wise:

1) Log all information to a database table

2) Write to a file (from php directly)

3) Call a C++ executable, that will write this info to a file in parallel [so the script can continue execution without waiting for the file write to occur …… is this even possible]

I may be trying to optimize unnecessarily/prematurely, but still – any thoughts / ideas on this would be appreciated. (I think efficiency of file write/logging can really be a concern if I have say 100 visits per minute…)

Thanks & Regards,

JP

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:32:35+00:00Added an answer on May 15, 2026 at 1:32 am
    1. Robust but could be a pain to implement
    2. Be careful for multithreading. What happens if two users call simultaneously your php script and the file is already open for writing.
    3. Same as 2 but the exception will occur in the C++ executable.

    I would suggest you using a logging framework such as log4php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to include a vertical line on every page of my report, which
basically i wish to achieve like user type file name,then video will be pop
I have started learning with Liferay 6.1 What I wish to achieve is: Displaying
So, I have a particularly unique goal I wish to achieve with CSS, HTML
I wish to achieve content load when the user scrolls to the bottom of
I'll describe how the thing works now and then what I wish to achieve:
I wish to create a simple layout like below. Can someone please tell me
I wish to run commands like NODE_ENV=production node server or cd ~/app/cms; npm test
I wish to achieve to limit user on only 0 or 1 when program
What i wish to achieve, is a jQuery image preloader, that loads a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.