Jump to content
MakeWebGames

Track Players' Actions - The Easy Way


Recommended Posts

Info - This mod won't (in-depthly) track your users' inputs, but it'll allow you to see their browsing habits while playing the game.

Involves editing files.

Open staff_logs.php

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Underneath paste:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Go to the end of the file, and paste:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Save, upload.

Open header.php, find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Paste under:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Save, upload.

SQL:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Please note that using this on a small game over the course of a month, it resulted in a table that weighed in at 52KB. (Small game = less than 10 active players per day.) You can run a command in your day/weekly cron to delete actions that are over X age old. (That's what I'm doing now.) This will work 100% of the time the game doesn't have errors. (It'll even work if you only have require('globals.php'); in your file.)

The page is sanitized before added into the DB. The only real use of this is to track your users' actions, as this won't let you see their forms (unless you have the forms sent over GET)

Comments, rating, etc..

iazRlbu.png

Link to comment
Share on other sites

[...] (unless you have the forms sent over GET)[...]

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Everything1 is logged. Use unserialize() in the log view - make sure to prevent it from parsing as code on output

1 Not actually everything, but most of it..

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...