| View previous topic :: View next topic |
| Author |
Message |
damento Newbie cheater
Reputation: 0
Joined: 25 Mar 2014 Posts: 17
|
Posted: Thu Jan 14, 2016 6:18 am Post subject: Trainer analytics? Is this possible? |
|
|
I'm sure I had this working months ago, but can't make it work now!
Basically, I have a free tool and I'd like to be able to see how many people are using it daily, so I made a google analytics account and attempted to add a function into the program that would send a Post to a php script, and added the analyitcs code to the php script, - this didn't work.
At last resort, I could shellExecute to a page on my website, and put analytics on that, but I don't want to cause an inconvience to my users.
I've tried this function:
| Code: |
function analyitcs()
http = require("socket.http")
AppLocation = 'http://mydomain.net/analyse/'
local ProgData111 = "command="..tostring("analyse");
local Main111, Status = http.request(AppLocation..'post-analytics.php', ProgData111);
Main111 = (Main111);
end
analyitcs()
|
But this does not work, does anyone have any idea how I can do this?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Thu Jan 14, 2016 6:55 am Post subject: |
|
|
you probably need a new luasocket compiled for lua 5.3 for that code.
Anyhow, if you wish to do it without an external dependancy like luasocket then use something like this code:
| Code: |
function analitics()
local i=getInternet()
local x=i.getURL('http://mydomain.net/analyse/post-analytics.php?command=analyse')
i.destroy()
--print(x)
end
|
If you don't like the freeze for a minute or so when the server is down, I recommend launching it in a thread
e.g:
createNativeThread(analitics)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
damento Newbie cheater
Reputation: 0
Joined: 25 Mar 2014 Posts: 17
|
Posted: Thu Jan 14, 2016 12:26 pm Post subject: |
|
|
Great, thanks for that.
I'm just trying to work out how I can make the script work, as when I do this it's not logging it as a new 'view' in google analytics?
|
|
| Back to top |
|
 |
Rydian Grandmaster Cheater Supreme
Reputation: 31
Joined: 17 Sep 2012 Posts: 1358
|
Posted: Thu Jan 14, 2016 2:25 pm Post subject: |
|
|
Probably 'cause Google checks user-agent strings and other info and can tell it's not an actual person making an actual visit to the site, or maybe 'cause it's from your own IP, etc.
Best thing to do would be to make an actual script that logs views (PHP or such).
_________________
|
|
| Back to top |
|
 |
damento Newbie cheater
Reputation: 0
Joined: 25 Mar 2014 Posts: 17
|
Posted: Thu Jan 14, 2016 2:54 pm Post subject: |
|
|
thank you just gonna pay a developer to do this for me now.
|
|
| Back to top |
|
 |
|