Workshop statistic tracking

How can I track the statistics from my addon? I just want to know how many individual clients have opened the menu.

On opening the menu, check if it’s their first time, and if so, send a post request to a website.

How do I set up my website to receive the post requests?

Using php, read $_POST[ ‘form_field_name_such_as_textbox_name’ ]; etc… Do something with the data.

Be careful though, people like to fuck up peoples shit when they allow clients to upload data, like there was a site a while ago that when you used the addon, it would take a photo of your screen and upload it to a website, one thing led to another and the site turned into pornhub.

I don’t know how to code PHP or HTML so i guess ill have to get someone else to do it.

Here’s an example of PHP handling http.post:

[sp]not mine[/sp]

That is for error handling. It will send ALL Lua errors there, not just things related to his workshop addon.
What the guy wants is a way to have “his own” information sent to an URL. In some way, yes, it is similar. But this doesn’t show anything of how to properly handle it.

What he needs, is receiving the POST, checking it for validity, then sending it to MySQL to store it. Maybe even query things from MySQL before it is inserted, you never know.

What you need to keep in mind with your addon, if you want to keep a list of people i.e. how many times a certain SteamID has opened a menu, people can easily “attack” your API by just calling it with random SteamIDs. It’ll render your information useless.

So unless you have things to log that can not be faked, I don’t think there’s any reason to do what you want to do, people will abuse it for their own fun.