Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Trainer analytics? Is this possible?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
damento
Newbie cheater
Reputation: 0

Joined: 25 Mar 2014
Posts: 17

PostPosted: Thu Jan 14, 2016 6:18 am    Post subject: Trainer analytics? Is this possible? Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25839
Location: The netherlands

PostPosted: Thu Jan 14, 2016 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
damento
Newbie cheater
Reputation: 0

Joined: 25 Mar 2014
Posts: 17

PostPosted: Thu Jan 14, 2016 12:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Thu Jan 14, 2016 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
damento
Newbie cheater
Reputation: 0

Joined: 25 Mar 2014
Posts: 17

PostPosted: Thu Jan 14, 2016 2:54 pm    Post subject: Reply with quote

thank you Smile just gonna pay a developer to do this for me now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites