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 


Internet Class - How to use postURL

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Sat Sep 15, 2018 6:20 am    Post subject: Internet Class - How to use postURL Reply with quote

To pass some parameter using getURL and get the result I look like this:
Code:
returndata = int:getURL("http://myhost/?p=foo")

But I want to use the postURL, but it is not working:
Code:
returndata = int:getURL("http://myhost/", "p=foo")

How do I use postURL?

_________________
...
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Sep 15, 2018 8:34 am    Post subject: Reply with quote

you still have getUrl....not postUrl
(all I know is)
Code:
Internet class (Object)
global functions
  getInternet(string) - Returns an internet class object.  The string provided will be the name of the client provided

properties
  Header : string - the additional header to be sent with the next getURL request
methods
  getURL(path) - returns a string containing the contents of the url. nil on failure
  postURL(path, urlencodeddata) - posts the given data to the path and returns the results

copy pasted from celua.txt

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Sat Sep 15, 2018 12:25 pm    Post subject: Reply with quote

I know what is written in celua.txt, and I need to use postURL.
And so far nothing ...

_________________
...
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Sep 15, 2018 1:20 pm    Post subject: Reply with quote

well... have you tried
Code:
returndata = int:postURL("http://myhost/", "p=foo")
instead of
Code:
returndata = int:getURL("http://myhost/", "p=foo")
which is what you put in your question? I don't know of any actual website to test with but... that seems like it's worth a try.
You might also try with '.' instead of ':' since x:y(...) is just syntactic sugar for x.y(x,...) and the celua.txt documentation doesn't say to pass the internet object to it...

_________________
https://github.com/FreeER/ has a few CE related repos
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