Jump to content
MakeWebGames

User Agent Tracking


Recommended Posts

This mod has no REAL good use, outside of just knowing what your playerbase is using in terms of OS, Browser, etc.. I suppose you could use it to see if someone's being a bad multi and whatnot, but even then, you'd have to have some more incriminating evidence other than "Shared exact User Agent". Nonetheless...

 

You're unable to view this code.

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

 

 

Open globals.php

Add after: global $jobquery, $housequery;

You're unable to view this code.

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

 

 

Now, in your house, job, and user queries, add:

 

You're unable to view this code.

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

 

Save it up! Now open your viewuser.php

Change your queries section to:

You're unable to view this code.

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

 

 

Scroll down to your staff area, paste in at the bottom of it:

You're unable to view this code.

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

 

 

Save and upload. Things should work then! :)

Screeny!

[ATTACH]2133[/ATTACH]

I suppose one COULD make this much more intuitive, like... if contains Windows 6.1, echo out that its Windows 7, or something.

1437017590_bandicam2015-07-0414-02-02-143.jpg.3f0397f2cd13af54cb2736c8f4afccc6.jpg

Link to comment
Share on other sites

Lol, i dont think that is supposed to be part of the mod

I think user agent tracking might be useful if you want to see the population of your game that use mobile devices and use that to decide whether or not to build either a mobile app or mobile site, but then you could just make a poll.

Edited by Coly010
Link to comment
Share on other sites

Plus I'm pretty sure there is a much more efficient way of doing this. You should check for their user agent first and if they have one then check to see if it has changed. If it changed then change it in th database and if it doesnt exist then insert it. I don't think there is a point to change it on every page load.

Another thing is is that User Agents can be changed on the fly

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