Jump to content

Recommended Posts

On my website I have a video page like youtube, I want to store data when a user visits the video page. The data I want to store is videoID, IP, referrer and date. 

 

My concern is that I am not sure of the best way to store this data. One option I have thought about is MySQL and the other is in a CSV file. If I have lots of data which option would be the quickest to read the data from?

 

I can think about pros and cons for both options but what is your opinion? (Keeping in mind growth of the website). Also, are there any other viable options I have not thought about?

Link to comment
https://forums.phpfreaks.com/topic/281068-storing-web-analytics-data/
Share on other sites

I think a problem with the CSV would be that if the file gets big then read/write times are going to be really long. You'd never have this problem with a MySQL insert. Personally I'd just use Google analytics or statcounter. You wouldn't be able to collect IP with Google analytics, because it's against their TOS, but statcounter shows it by default (unless they've changed it recently).

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.