|
| 19 Aug 2015 04:57 PM |
I am trying to use ROBLOX's HTTP Post to create an account on my site. My site's login/signup works just fine. I sniffed out the web request with Wireshark, now I am looking on how would I use ROBLOX's poor http methods to do this.
Code:
signup.register.MouseButton1Click:connect(function() local signupdata = {} signupdata['username'] = signup.username.Text signupdata['psswrd'] = signup.psswrd.Text signupdata['register'] = "Register"
local signupjson = http:JSONEncode(signupdata) local request = http:PostAsync("http://rbxplus.com/register.php", signupjson) end)
Am I sending the data correctly? Does it need to sent as JSON or can I send it as a normal QueryString? |
|
|
| Report Abuse |
|
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 19 Aug 2015 04:59 PM |
| ^ why i don't use http.Spam accounts. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 05:04 PM |
| This is my first time using HTTP service on ROBLOX for posting, I've just used it for JSON encoding / decoding. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 05:15 PM |
I made a place so other people didn't have to google for over and hour. This contains all you need to know...
http://www.roblox.com/games/282342479/httpService-Tutorial
Read the description! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 19 Aug 2015 05:56 PM |
| I'm confused. You don't have a problem here. By default, it sends the data as a JSON string. Do you not know how to obtain this on your server code? If I assume it is PHP, use the file_get_contents("php://input"); stream. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:02 PM |
My register code already obtains that. There's no error but it also doesn't create the account, as looking in my SQLtable. Am I doing something wrong? |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:04 PM |
| Also I've used a jquery post request and it worked, so is something firing wrong or am I doing something incorrect ? |
|
|
| Report Abuse |
|
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 19 Aug 2015 06:06 PM |
| Just doesn't create the account? That sounds like a server code issue, but how would I know? You didn't post the useful stuff. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:21 PM |
HTTP Request. http://prntscr.com/86mwjx
ROBLOX doesn't let me post the PHP code. If you want it I can pm it. |
|
|
| Report Abuse |
|
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 19 Aug 2015 06:23 PM |
| Why did you make another unhelpful post? The issue is with the server code. Of course it needs to be posted or sent. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:24 PM |
| As in the screenshot above, am I duplicating this correctly? |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:29 PM |
| I sent a pm of the server code. |
|
|
| Report Abuse |
|
|
TIV67
|
  |
| Joined: 05 Mar 2014 |
| Total Posts: 630 |
|
|
| 19 Aug 2015 06:38 PM |
"I made a place so other people didn't have to google for over and hour. This contains all you need to know...
http://www.roblox.com/games/282342479/httpService-Tutorial
Read the description! " thanks for your mysql username and pass and server host |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2015 06:41 PM |
I noticed that but I wasn't going to say anything... Anyway, bump? |
|
|
| Report Abuse |
|
|
| |
|